knolleary / pubsubclient

A client library for the Arduino Ethernet Shield that provides support for MQTT.
http://pubsubclient.knolleary.net/
MIT License
3.78k stars 1.46k forks source link

bugfix for keep alive zero #1038

Open ChuckMash opened 6 months ago

ChuckMash commented 6 months ago

Setting keep alive to 0, or infinite keep alive, is not currently handled correctly. Currently the client will immediately disconnect when keep alive is set to 0, this fix adds a check for this state before attempting PINGREQ.

Solves #1033

damdo commented 5 months ago

Hey @knolleary would you be able to review/merge this oneliner bugfix? It would save A LOT of reconnections for all of us! Thanks :)

hmueller01 commented 5 months ago

Unfortunately there are so may undone pull requests here that one can believe that @knolleary dropped support of this repo. Maybe it's good to do a PR at https://github.com/thingsboard/pubsubclient as they promised to support development on this library.

damdo commented 5 months ago

@hmueller01 opened a PR there: https://github.com/thingsboard/pubsubclient/pull/7