adafruit / Adafruit_MQTT_Library

Arduino library for MQTT support
MIT License
571 stars 291 forks source link

Expose ability to set KeepAlive (MQTT_CONN_KEEPALIVE) #186

Open brentru opened 3 years ago

brentru commented 3 years ago

MQTT_CONN_KEEPALIVE (https://github.com/adafruit/Adafruit_MQTT_Library/blob/master/Adafruit_MQTT.h#L105) should be exposed via a new setKeepAlive function

NOTE: a MQTT KeepAlive value should only be modified when the client is not connected, setKeepAlive should verify connection.

Default timeout of 5min should be retained for backwards compatibly.