diff --git a/ChangeLog.txt b/ChangeLog.txt index e83010eb..becbb44a 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,10 @@ +1.4.14 - 20170710 +================= + +Broker: +- Fix regression from 1.4.13 where persistence data was not being saved. + + 1.4.13 - 20170627 ================= diff --git a/src/mosquitto.c b/src/mosquitto.c index 1fd1e7ff..b28150ce 100644 --- a/src/mosquitto.c +++ b/src/mosquitto.c @@ -398,6 +398,16 @@ int main(int argc, char *argv[]) } #endif + HASH_ITER(hh_id, int_db.contexts_by_id, ctxt, ctxt_tmp){ + mqtt3_context_send_will(&int_db, ctxt); + } + +#ifdef WITH_PERSISTENCE + if(config.persistence){ + mqtt3_db_backup(&int_db, true); + } +#endif + HASH_ITER(hh_id, int_db.contexts_by_id, ctxt, ctxt_tmp){ #ifdef WITH_WEBSOCKETS if(!ctxt->wsi){ @@ -422,12 +432,6 @@ int main(int argc, char *argv[]) #endif mosquitto__free_disused_contexts(&int_db); -#ifdef WITH_PERSISTENCE - if(config.persistence){ - mqtt3_db_backup(&int_db, true); - } -#endif - mqtt3_db_close(&int_db); if(listensock){