256dpi / arduino-mqtt

MQTT library for Arduino
MIT License
1.01k stars 232 forks source link

Can you add Callbacks for onConnect and onDisconnect? #176

Closed x0tester0x closed 3 years ago

x0tester0x commented 4 years ago

It would be really handy if you can add these two callbacks, because then it's much easier to handle MQTT reconnection.

256dpi commented 4 years ago

I think these make the API unnecessarily complex and since the client is not in any way asynchronous there is no added benefit to just checking with client.connected().