commit | adb80877077e8793c1a113e68d819087582941cc | [log] [tgz] |
---|---|---|
author | Simen S. Røstad <simen.rostad@nordicsemi.no> | Thu Dec 03 15:33:27 2020 +0100 |
committer | Anas Nashif <anas.nashif@intel.com> | Tue Dec 08 14:08:36 2020 -0500 |
tree | 36c02b985f847bc873644fdf8d398efc045e9c37 | |
parent | 34d7c78f4f3f0848382775b8f95e2870d422f9ad [diff] |
net: mqtt: Return -1 if keepalive messages are disabled. In mqtt_keepalive_time_left(), return -1 if keep alive messages are disabled by setting CONFIG_MQTT_KEEPALIVE=0. This allows to use mqtt_keepalive_time_left() directly as an input for poll(). If no keep-alive is expected, -1 would indicate that poll() can block until new data is available on the socket. Signed-off-by: Simen S. Røstad <simen.rostad@nordicsemi.no>