Don't free local bridge clients on disconnect.

This commit is contained in:
Roger A. Light 2014-08-05 09:06:50 +01:00
parent 6af0c236e8
commit 950db12c74

View File

@ -354,7 +354,11 @@ void do_disconnect(struct mosquitto_db *db, struct mosquitto *context)
} }
} }
mqtt3_context_disconnect(db, context); mqtt3_context_disconnect(db, context);
#ifdef WITH_BRIDGE
if(context->clean_session && !context->bridge){
#else
if(context->clean_session){ if(context->clean_session){
#endif
HASH_ADD_KEYPTR(hh_for_free, db->contexts_for_free, context, sizeof(void *), context); HASH_ADD_KEYPTR(hh_for_free, db->contexts_for_free, context, sizeof(void *), context);
if(context->id){ if(context->id){
HASH_DELETE(hh_id, db->contexts_by_id, context); HASH_DELETE(hh_id, db->contexts_by_id, context);