diff --git a/ChangeLog.txt b/ChangeLog.txt index 674b24f5..c7b6e5d9 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -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. diff --git a/lib/thread_mosq.c b/lib/thread_mosq.c index 1bd1f780..6b83c7d6 100644 --- a/lib/thread_mosq.c +++ b/lib/thread_mosq.c @@ -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);