@ -54,6 +54,9 @@ static struct mosquitto *_db_find_or_add_context(struct mosquitto_db *db, const
return NULL;
}
#ifdef WITH_SYS_TREE
db->disconnected_count++;
#endif
context->clean_session = false;
HASH_ADD_KEYPTR(hh_id, db->contexts_by_id, context->id, strlen(context->id), context);
@ -419,7 +419,6 @@ int mqtt3_handle_connect(struct mosquitto_db *db, struct mosquitto *context)
mqtt3_context_cleanup(db, found_context, false);
found_context->state = mosq_cs_connected;
if(context->address){
//found_context->address = _mosquitto_strdup(context->address);
found_context->address = context->address;
context->address = NULL;
}else{