Skip to content

Commit

Permalink
Fix messages being queued for disconnected bridges
Browse files Browse the repository at this point in the history
This occurred incorrectly when clean start was set to true.

Closes #1729. Thanks to Andreyooo.
  • Loading branch information
ralight committed Jul 15, 2020
1 parent d9003bb commit 4e0312c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ChangeLog.txt
Expand Up @@ -7,6 +7,8 @@ Broker:
- Don't quit with an error if opening the log file isn't possible.
Closes #821.
- Fix bridge topic remapping when using "" as the topic. Closes #1749.
- Fix messages being queued for disconnected bridges when clean start was
set to true. Closes #1729.

Client library:
- Improved documentation around connect callback return codes. Close #1730.
Expand Down
4 changes: 4 additions & 0 deletions src/database.c
Expand Up @@ -394,6 +394,10 @@ int db__message_insert(struct mosquitto_db *db, struct mosquitto *context, uint1
}
}
}
if(context->bridge && context->bridge->clean_start == true){
mosquitto_property_free_all(&properties);
return 2;
}
}

if(context->sock != INVALID_SOCKET){
Expand Down

0 comments on commit 4e0312c

Please sign in to comment.