Skip to content

Commit

Permalink
Fix messages with an expiry interval missing the property.
Browse files Browse the repository at this point in the history
They would be be sent without an expiry interval property just before
they were expired.

Closes #1464. Thanks to Dustin Sallings.
  • Loading branch information
ralight committed Oct 31, 2019
1 parent 06a27e7 commit b622aae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ChangeLog.txt
Expand Up @@ -11,6 +11,8 @@ Broker:
Closes #1459.
- Fix retained messages with an expiry interval not being expired after being
restored from persistence. Closes #1464.
- Fix messages with an expiry interval being sent without an expiry interval
property just before they were expired. Closes #1464.

Client library:
- Fix publish properties not being passed to on_message_v5 callback for QoS 2
Expand Down
2 changes: 1 addition & 1 deletion src/subs.c
Expand Up @@ -987,7 +987,7 @@ static int retain__process(struct mosquitto_db *db, struct mosquitto__subhier *b
mosquitto_property *properties = NULL;
struct mosquitto_msg_store *retained;

if(branch->retained->message_expiry_time > 0 && now > branch->retained->message_expiry_time){
if(branch->retained->message_expiry_time > 0 && now >= branch->retained->message_expiry_time){
db__msg_store_ref_dec(db, &branch->retained);
branch->retained = NULL;
#ifdef WITH_SYS_TREE
Expand Down

0 comments on commit b622aae

Please sign in to comment.