diff --git a/ChangeLog.txt b/ChangeLog.txt index acdaf0e4..8070f019 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -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 diff --git a/src/subs.c b/src/subs.c index fc62bef8..cf71a1fb 100644 --- a/src/subs.c +++ b/src/subs.c @@ -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