From d17d7c9229becead17c5cdcf597a942899d0b63c Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Tue, 25 Jun 2019 17:01:41 +0100 Subject: [PATCH] Fix persistent clients being incorrectly expired on Raspberry Pis. Closes #1272. Thanks to BowenMarmot and addendumE. --- ChangeLog.txt | 7 +++++++ src/session_expiry.c | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 6b3f871665..5282e1dcdc 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,10 @@ +1.6.4 - 2019xxxx +================ + +Broker: +- Fix persistent clients being incorrectly expired on Raspberry Pis. + Closes #1272. + 1.6.3 - 20190618 ================ diff --git a/src/session_expiry.c b/src/session_expiry.c index 057e032cdd..68540a7184 100644 --- a/src/session_expiry.c +++ b/src/session_expiry.c @@ -94,7 +94,9 @@ void session_expiry__check(struct mosquitto_db *db, time_t now) last_check = now; DL_FOREACH_SAFE(expiry_list, item, tmp){ - if(item->context->session_expiry_time < now){ + if(item->context->session_expiry_interval != UINT32_MAX + && item->context->session_expiry_time < now){ + context = item->context; session_expiry__remove(context);