Skip to content
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: after disconnect/connect, client twins should be pulled (#4629) #4669

Merged
merged 1 commit into from
Mar 24, 2021

Conversation

vipeller
Copy link
Contributor

Using mqtt broker upstream, after a disconnection to the parent device and connecting back, edge should pull the twin of the connected clients. This used to work by accident: there was a bug, which did not close existing cloud proxy objects, so they remained subscribed to connection events and forwarder those, so eventually twin manager received a notification that device_x regained its connection, which in turn pulled the twin.
Fixing this bug removed the accidental event forwarding of the dead object, and because on losing the connection these objects are removed, nothing forwarded events to twin manager for the individual devices.
This fix copies the solution of the legacy CloudConnection (ConnectToIotHub), which during proxy creation calls an explicit Open() method, which sends the notification about the device connected.

(cherry picked from commit 794c324)

)

Using mqtt broker upstream, after a disconnection to the parent device and connecting back, edge should pull the twin of the connected clients. This used to work by accident: there was a bug, which did not close existing cloud proxy objects, so they remained subscribed to connection events and forwarder those, so eventually twin manager received a notification that device_x regained its connection, which in turn pulled the twin.
Fixing this bug removed the accidental event forwarding of the dead object, and because on losing the connection these objects are removed, nothing forwarded events to twin manager for the individual devices.
This fix copies the solution of the legacy CloudConnection (ConnectToIotHub), which during proxy creation calls an explicit Open() method, which sends the notification about the device connected.

(cherry picked from commit 794c324)
@kodiakhq kodiakhq bot merged commit eb6051c into Azure:release/1.2 Mar 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants