Commit a330c5ca authored by Roger A. Light's avatar Roger A. Light
Browse files

[471334] Fix incorrect loop timeout with keepalive=0.

Fix incorrect loop timeout being chosen when using the threaded
interface and keepalive = 0.

Thanks to Gianfranco Costamagna.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=471334
parent 104489f6
......@@ -5,6 +5,8 @@ Broker:
Client library:
- Add missing error strings to mosquitto_strerror.
- Handle fragmented TLS packets without a delay. Closes #470660.
- Fix incorrect loop timeout being chosen when using threaded interface and
keepalive = 0. Closes #471334.
Clients:
- Report error string on connection failure rather than error code.
......
......@@ -89,7 +89,7 @@ void *_mosquitto_thread_main(void *obj)
if(!mosq->keepalive){
/* Sleep for a day if keepalive disabled. */
mosquitto_loop_forever(mosq, mosq->keepalive*1000*86400, 1);
mosquitto_loop_forever(mosq, 1000*86400, 1);
}else{
/* Sleep for our keepalive value. publish() etc. will wake us up. */
mosquitto_loop_forever(mosq, mosq->keepalive*1000, 1);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment