-
Notifications
You must be signed in to change notification settings - Fork 55
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: disconnect cleanly from local MQTT broker in tedge connect #3025
fix: disconnect cleanly from local MQTT broker in tedge connect #3025
Conversation
First commit is to add the system test ( |
Robot Results
|
…SCONNECT packet Signed-off-by: Reuben Miller <[email protected]>
Signed-off-by: Reuben Miller <[email protected]>
437fc32
to
19e320d
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files
|
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.
The added test step is doing what is intended for
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.
The added test was reviewed and it is passing
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.
Confirming that this patch fixes the problem.
Simple and sufficient for now, but another example of rumqttc
API being a bit too verbose for our use case here. For a more elegant fix in the future, we should either use our mqtt-channel
or create a wrapper over rumqttc::Client
that at minimum provides a disconnect on drop.
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
Proposed changes
Send MQTT
DISCONNECT
on local MQTT connections (in normal operation) in thetedge connect
andtedge reconnect
commands.Types of changes
Paste Link to the issue
Checklist
cargo fmt
as mentioned in CODING_GUIDELINEScargo clippy
as mentioned in CODING_GUIDELINESFurther comments