提交 c749ed6f 编写于 作者: N Norbert Heusser

Do not add outgoing bridge connection context to session expiry list on disconnect

Signed-off-by: NNorbert Heusser <norbert.heusser@cedalo.com>
上级 269756a1
......@@ -214,19 +214,20 @@ void context__disconnect(struct mosquitto *context)
context__send_will(context);
net__socket_close(context);
if(context->session_expiry_interval == 0){
/* Client session is due to be expired now */
#ifdef WITH_BRIDGE
if(context->bridge == NULL)
if(context->bridge == NULL)
/* Outgoing bridge connection never expire */
#endif
{
{
if(context->session_expiry_interval == 0){
/* Client session is due to be expired now */
if(context->will_delay_interval == 0){
/* This will be done later, after the will is published for delay>0. */
context__add_to_disused(context);
}
}else{
session_expiry__add(context);
}
}else{
session_expiry__add(context);
}
keepalive__remove(context);
mosquitto__set_state(context, mosq_cs_disconnected);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册