From 05171b266d71b791ff592f97dd58682e22e0a45e Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Wed, 6 Nov 2019 22:25:33 +0000 Subject: [PATCH] Fix TLS Websockets clients not receiving messages. This can occurs after one client takes over a previous connection. Closes #1489. Thanks to Bas Verhoeven. --- ChangeLog.txt | 2 ++ src/handle_connect.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/ChangeLog.txt b/ChangeLog.txt index ce053895..22edb4c6 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -13,6 +13,8 @@ Broker: 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. +- Fix TLS Websockets clients not receiving messages after taking over a + previous connection. Closes #1489. Client library: - Fix publish properties not being passed to on_message_v5 callback for QoS 2 diff --git a/src/handle_connect.c b/src/handle_connect.c index 17434b2b..695ce2aa 100644 --- a/src/handle_connect.c +++ b/src/handle_connect.c @@ -160,6 +160,9 @@ int connect__on_authorised(struct mosquitto_db *db, struct mosquitto *context, v } } + if(context->clean_start == true){ + sub__clean_session(db, found_context); + } session_expiry__remove(found_context); will_delay__remove(found_context); will__clear(found_context);