From 950db12c74679cd27c7bb44cebec6c675120b21a Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Tue, 5 Aug 2014 09:06:50 +0100 Subject: [PATCH] Don't free local bridge clients on disconnect. --- src/loop.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/loop.c b/src/loop.c index 80963ff2..1b81b8c4 100644 --- a/src/loop.c +++ b/src/loop.c @@ -354,7 +354,11 @@ void do_disconnect(struct mosquitto_db *db, struct mosquitto *context) } } mqtt3_context_disconnect(db, context); +#ifdef WITH_BRIDGE + if(context->clean_session && !context->bridge){ +#else if(context->clean_session){ +#endif HASH_ADD_KEYPTR(hh_for_free, db->contexts_for_free, context, sizeof(void *), context); if(context->id){ HASH_DELETE(hh_id, db->contexts_by_id, context);