Fix bridge queued messages not being persisted.
This happens when local_cleansession is set to false and cleansession is set to true. Closes #2604. Thank to Frank Dekervel.
This commit is contained in:
parent
5d18962486
commit
fa31b6f41d
@ -22,6 +22,8 @@ Broker:
|
||||
security plugin. Closes #2525.
|
||||
- Fix confusing error message when dynamic security config file was a
|
||||
directory. Closes #2520.
|
||||
- Fix bridge queued messages not being persisted when local_cleansession is
|
||||
set to false and cleansession is set to true. Closes #2604.
|
||||
|
||||
Client library:
|
||||
- Fix threads library detection on Windows under cmake. Bumps the minimum
|
||||
|
@ -167,7 +167,11 @@ static int persist__client_save(FILE *db_fptr)
|
||||
memset(&chunk, 0, sizeof(struct P_client));
|
||||
|
||||
HASH_ITER(hh_id, db.contexts_by_id, context, ctxt_tmp){
|
||||
if(context && context->clean_start == false){
|
||||
if(context && (context->clean_start == false
|
||||
#ifdef WITH_BRIDGE
|
||||
|| (context->bridge && context->bridge->clean_start_local == false)
|
||||
#endif
|
||||
)){
|
||||
chunk.F.session_expiry_time = context->session_expiry_time;
|
||||
if(context->session_expiry_interval != 0 && context->session_expiry_interval != UINT32_MAX && context->session_expiry_time == 0){
|
||||
chunk.F.session_expiry_time = context->session_expiry_interval + db.now_real_s;
|
||||
|
Loading…
Reference in New Issue
Block a user