diff --git a/ChangeLog.txt b/ChangeLog.txt index 4e8bde1f..330bc252 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,8 @@ +Broker: +- Fix potential duplicate Will messages being sent when a will delay interval + has been set. + + 2.0.5 - 2021-01-11 ================== diff --git a/src/will_delay.c b/src/will_delay.c index 2fc6eb54..37af3997 100644 --- a/src/will_delay.c +++ b/src/will_delay.c @@ -40,6 +40,10 @@ int will_delay__add(struct mosquitto *context) { struct will_delay_list *item; + if(context->will_delay_entry){ + return MOSQ_ERR_SUCCESS; + } + item = mosquitto__calloc(1, sizeof(struct will_delay_list)); if(!item) return MOSQ_ERR_NOMEM;