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

Add Connection error callback to fix issue 1148 #1442

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Ivan-Bolshakov
Copy link

Added a callback message with an error connecting to the broker. This message is sent during all connection and reconnection attempts (including automatic reconnection attempts).
This MR solves problems #1148 and #1360

Signed-off-by: Ivan Bolshakov [email protected]

Signed-off-by: Ivan Bolshakov <[email protected]>
@Aposhian
Copy link

Looks good to me!

@Aposhian
Copy link

Do we want to consider adding this to MQTTAsync_setCallbacks? Or do we want to not do that in order to not change ABI compatibility?

src/MQTTAsync.h Outdated Show resolved Hide resolved
@Aposhian
Copy link

I have tested this and confirmed it to work. I created initial support on the C++ client for using this API: https://github.com/fireflyautomatix/paho.mqtt.cpp/tree/connection-error-callback

@Ivan-Bolshakov
Copy link
Author

@Aposhian @jumoog Thank you for your review!
@icraggs Could you please watch this MR when you have time?

@icraggs icraggs added this to the 1.4.0 milestone Apr 3, 2024
@icraggs icraggs linked an issue Apr 3, 2024 that may be closed by this pull request
@icraggs icraggs removed a link to an issue Apr 3, 2024
@icraggs
Copy link
Contributor

icraggs commented Apr 3, 2024

I don't think we want to add it to set callbacks, as that would cause some backward incompatibilities which we could manage, but is more complicated. As it is, as it is an interface change, I think it has to go into the 1.4 stream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants