-
Notifications
You must be signed in to change notification settings - Fork 234
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
fix(iot-device): fix issue with direct method after reconnect from temporary network disconnect - AMQP #1577
Conversation
…mporary network disconnect - AMQP DeviceClient doesn't fully reconnect after temporary network disconnect (AMQP), attempts to invoke direct method fails. Removed unnecessary boolean which were intended to carry over state between reconnection. With each reconnection, we instantiate new SessionHandler but only set the boolean to true (and create method/twin links) when sending first message during initial connection, thus during reconnection we never create method/twin links.
/azp run |
Azure Pipelines successfully started running 4 pipeline(s). |
...nt/src/main/java/com/microsoft/azure/sdk/iot/device/transport/amqps/AmqpsSessionHandler.java
Outdated
Show resolved
Hide resolved
…isconnect - AMQP reverting changes to AmqpsSessionHandler (e3558d2) and making sure after closing amqp connection due to transport error, we save previous AmqpsSessions so that their twin/methods subscriptions can persist.
/azp run |
Azure Pipelines successfully started running 4 pipeline(s). |
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.
Code change looks good. I'm assuming you've run this test locally and seen that the SDK recovers subscriptions even when onTransportError throws the network loss error?
Yes, I was able to test locally and confirm that SDK recovers subscriptions as we do not lose SessionHandler object |
Perfect. Then you are all good to merge. |
DeviceClient doesn't fully reconnect after temporary network disconnect (AMQP), attempts to invoke direct method fails.
Removed unnecessary boolean which were intended to carry over state between reconnection.
With each reconnection, we instantiate new SessionHandler but only set the boolean to true (and create method/twin links) when sending first message during initial connection, thus during reconnection we never create method/twin links.
github issue: #1571
Checklist
main
branch.Reference/Link to the issue solved with this PR (if any)
Description of the problem
Description of the solution