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> |
||
|---|---|---|
| .. | ||
| CMakeLists.txt | ||
| Kconfig | ||
| mqtt_decoder.c | ||
| mqtt_encoder.c | ||
| mqtt_internal.h | ||
| mqtt_os.h | ||
| mqtt_rx.c | ||
| mqtt_transport_socket_tcp.c | ||
| mqtt_transport_socket_tls.c | ||
| mqtt_transport_websocket.c | ||
| mqtt_transport.c | ||
| mqtt_transport.h | ||
| mqtt.c | ||