diff --git a/ChangeLog.txt b/ChangeLog.txt index 5bfb045c2b..e818ce16b3 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -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. diff --git a/src/database.c b/src/database.c index 11980d7a61..ef509db02b 100644 --- a/src/database.c +++ b/src/database.c @@ -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){