-
Notifications
You must be signed in to change notification settings - Fork 226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DeviceClient.close method may stuck when the connection has been lost inside the Connection handler #1110
Comments
I observe very similar behavior for |
@anthonyvercolano any update if and when it will be investigated? |
@vishnureddy17 Do you have any updates on this issue? |
Hi @riwaida, apologies for the delayed response, and thank you for your patience. I am still investigating this, but I've been able to reproduce the issue (or at least an issue that looks similar to this). I am actively working on it and should have an answer in the coming week. |
Just an update, I made a pull request that should fix the issue. I will be out next week, so I'm not able to write the tests and check it in. I've assigned the issue to @anthonyvercolano , he should take it from here. |
Released |
Context
Description of the issue
When I call DeviceClient.close with await operator in the Error handler, the close method does not returned and may stuck application. As far as my investigation, the issue happens when network connection has been lost before sending message inside Connection handler.
The issue is happening intermittently in the actual app. I am not sure how the issue was happened in the production scenario. But we could reproduce the problem with simple app on the debugger with instruction below.
Also, I confirmed that the issue happens only mqtt over websocket.
sendMessage
function in the sample code below.errorHandler
function will be called, and it invokesclose
method.Expected result:
close
method can be returned immediately.Actual result:
close
method does not returned forever and application stops running.Code sample exhibiting the issue
Console log of the issue
The text was updated successfully, but these errors were encountered: