-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Reconnect and Offline events #112
Comments
I'm not sure about suppressing them if they're not user driven but I definitely plan to add something like |
In my code I had to change all |
It is, admittedly, a bit of a pain in the arse to have to check client.disconnecting on every close to see if it's actually going to stay disconnected. What's your use case for it, outside of cleaning up once the client disconnects? |
Actually the clients I was firing up in my Mosca tests kept reconnecting. A part from that, it is much related to setting up everything correctly for each client after The real error was releasing offline & reconnect without changing the "minor" version number: with this API, you should never want to listen to these events anyway. However, if there is a valid use case I will fire two events, |
I think that the
connect
andclose
event in MqttClient, if they are not driven by the user (i.e.#end()
is called) should not be emitted. Instead we should emitreconnect
andoffline
, so we can distinguish between the two cases.What do you think?
The text was updated successfully, but these errors were encountered: