From 4b100df5b13f071954b93974bbef868c7afcf1ec Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Tue, 11 Aug 2020 10:56:35 +0100 Subject: [PATCH] Fix reconnect+will delay interval issue causing missing messages. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix clients not receiving messages after a previous client with the same client ID and positive will delay interval quit. Closes #1752. Thanks to Jiří Zuzaňák. --- ChangeLog.txt | 2 ++ lib/will_mosq.c | 1 + 2 files changed, 3 insertions(+) diff --git a/ChangeLog.txt b/ChangeLog.txt index 21f56a22..06f9b974 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -24,6 +24,8 @@ Broker: - Don't try to start DLT logging if DLT unavailable, to avoid a long delay when shutting down the broker. Closes #1735. - Fix potential memory leaks. Closes #1773. Closes #1774. +- Fix clients not receiving messages after a previous client with the same + client ID and positive will delay interval quit. Closes #1752. Client library: - Improved documentation around connect callback return codes. Close #1730. diff --git a/lib/will_mosq.c b/lib/will_mosq.c index 97fa67d0..59639f4a 100644 --- a/lib/will_mosq.c +++ b/lib/will_mosq.c @@ -120,6 +120,7 @@ int will__clear(struct mosquitto *mosq) mosquitto__free(mosq->will); mosq->will = NULL; + mosq->will_delay_interval = 0; return MOSQ_ERR_SUCCESS; }