提交 6d240a9d 编写于 作者: R Roger A. Light

Fix bridges being expired after being restored.

This occurred with non-matching cleansession/local_cleansession being
expired on start after restoring from persistence.

Closes #2634. Thanks to everyone on the issue.
上级 3b2f3c6d
......@@ -7,6 +7,8 @@ Broker:
assertions removed. Closes #2708.
- Fix default settings incorrectly allowing TLS v1.1. Closes #2722.
- Use line buffered mode for stdout. Closes #2354. Closes #2749.
- Fix bridges with non-matching cleansession/local_cleansession being expired
on start after restoring from persistence. Closes #2634.
- Fix connections being limited to 2048 on Windows. The limit is now 8192,
where supported. Closes #2732.
......
......@@ -167,11 +167,14 @@ 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 &&
#ifdef WITH_BRIDGE
|| (context->bridge && context->bridge->clean_start_local == false)
((!context->bridge && context->clean_start == false)
|| (context->bridge && context->bridge->clean_start_local == false))
#else
context->clean_start == 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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册