-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
re-check reconnecting state before emitting #232
re-check reconnecting state before emitting #232
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kalinkostashki thanks - I left some remarks. :)
I think this solution should work fixing the problem you observed - good catch. 👍
java/src/main/java/org/eclipse/ditto/client/messaging/internal/WebSocketMessagingProvider.java
Outdated
Show resolved
Hide resolved
java/src/main/java/org/eclipse/ditto/client/messaging/internal/WebSocketMessagingProvider.java
Outdated
Show resolved
Hide resolved
java/src/main/java/org/eclipse/ditto/client/messaging/internal/WebSocketMessagingProvider.java
Outdated
Show resolved
Hide resolved
java/src/main/java/org/eclipse/ditto/client/messaging/internal/WebSocketMessagingProvider.java
Outdated
Show resolved
Hide resolved
176db08
to
336ba20
Compare
for line 375 where I catch the InterruptedException I'm not quite sure how to handle it. |
Yeah - normally the "correct" thing is to do |
@kalinkostashki do you want to add that Thread interruption? |
0f16d36
to
489a55f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Thanks for the fix @kalinkostashki
- since the connectExecutor thread starts a reconnect which in turn causes the websocket connection to go into onConnected() method in the default(callback). This can cause an emit of message before reconnecting boolean is set to false - introduced a mechanism in order to make sure and retry several times to get the correct value Signed-off-by: Kalin Kostashki <kalin.kostashki@bosch.com>
Signed-off-by: Kalin Kostashki <kalin.kostashki@bosch.com>
489a55f
to
83b32b5
Compare
Fixes: #231