Skip to content

Commit

Permalink
Fix potential duplicate Will messages being sent.
Browse files Browse the repository at this point in the history
This could have occurred when a will delay interval had been set.
  • Loading branch information
ralight committed Jan 14, 2021
1 parent e78c04d commit 4be32ae
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -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
==================

Expand Down
4 changes: 4 additions & 0 deletions src/will_delay.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 4be32ae

Please sign in to comment.