Skip to content

Commit

Permalink
Changelog update.
Browse files Browse the repository at this point in the history
Fix reconnecting for bridges that use TLS on Windows.

Closes #154.

Thanks to Dmitry Kaukov.
  • Loading branch information
ralight committed May 14, 2016
1 parent 606aa5b commit 3048c5b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Broker:
- Fix incorrect $SYS heap memory reporting when using ACLs.
- Bridge config parameters couldn't contain a space, this has been fixed.
Closes #150.
- Fix reconnecting for bridges that use TLS on Windows. Closes #154.

Client library:
- Fix the case where a message received just before the keepalive timer
Expand Down
5 changes: 5 additions & 0 deletions src/persist.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ static int mqtt3_db_message_store_write(struct mosquitto_db *db, FILE *db_fptr)
stored = db->msg_store;
while(stored){
if(!strncmp(stored->topic, "$SYS", 4)){
if(stored->ref_count == 1 && stored->dest_id_count == 0){
/* $SYS messages that are only retained shouldn't be persisted. */
stored = stored->next;
continue;
}
/* Don't save $SYS messages as retained otherwise they can give
* misleading information when reloaded. They should still be saved
* because a disconnected durable client may have them in their
Expand Down

0 comments on commit 3048c5b

Please sign in to comment.