[191] Fix some $SYS messages being incorrectly persisted.
Closes #191. Bug: https://github.com/eclipse/mosquitto/issues/191
This commit is contained in:
parent
23113bb5f5
commit
2c54104ce3
@ -5,6 +5,7 @@ Broker:
|
||||
- Fix TLS operation with websockets listeners and libwebsockts 2.x. Closes
|
||||
#186.
|
||||
- Don't disconnect client on HUP before reading the pending data. Closes #7.
|
||||
- Fix some $SYS messages being incorrectly persisted. Closes #191.
|
||||
|
||||
Build:
|
||||
- Don't attempt to install docs when WITH_DOCS=no. Closes #184.
|
||||
|
@ -140,7 +140,7 @@ static int mqtt3_db_message_store_write(struct mosquitto_db *db, FILE *db_fptr)
|
||||
stored = db->msg_store;
|
||||
while(stored){
|
||||
if(stored->topic && !strncmp(stored->topic, "$SYS", 4)){
|
||||
if(stored->ref_count == 1 && stored->dest_id_count == 0){
|
||||
if(stored->ref_count <= 1 && stored->dest_id_count == 0){
|
||||
/* $SYS messages that are only retained shouldn't be persisted. */
|
||||
stored = stored->next;
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user