Roger Light avatar Roger Light committed 4df5cab

Local bridges now act on clean_session correctly. Thanks to Karl Palsson.

Comments (0)

Files changed (2)

 - Fix max_inflight_messages and max_queued_messages not being applied.
 - Fix documentation error in mosquitto.conf.
 - Ensure that QoS 2 queued messages are sent out in a timely manner.
+- Local bridges now act on clean_session correctly.
 
 Client:
 - Fix "mosquitto_pub -l -q 2" disconnecting before all messages were
 	mqtt3_bridge_packet_cleanup(context);
 	mqtt3_db_message_reconnect_reset(context);
 
+	if(context->clean_session){
+		mqtt3_subs_clean_session(db, context, &db->subs);
+		mqtt3_db_messages_delete(context);
+	}
+
 	for(i=0; i<context->bridge->topic_count; i++){
 		if(context->bridge->topics[i].direction == bd_out || context->bridge->topics[i].direction == bd_both){
 			_mosquitto_log_printf(NULL, MOSQ_LOG_DEBUG, "Bridge %s doing local SUBSCRIBE on topic %s", context->id, context->bridge->topics[i].local_topic);
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.