Do not add outgoing bridge connection context to session expiry list on disconnect
Signed-off-by: Norbert Heusser <norbert.heusser@cedalo.com>
This commit is contained in:
parent
269756a171
commit
c749ed6fd5
@ -214,20 +214,21 @@ void context__disconnect(struct mosquitto *context)
|
|||||||
|
|
||||||
context__send_will(context);
|
context__send_will(context);
|
||||||
net__socket_close(context);
|
net__socket_close(context);
|
||||||
if(context->session_expiry_interval == 0){
|
|
||||||
/* Client session is due to be expired now */
|
|
||||||
#ifdef WITH_BRIDGE
|
#ifdef WITH_BRIDGE
|
||||||
if(context->bridge == NULL)
|
if(context->bridge == NULL)
|
||||||
|
/* Outgoing bridge connection never expire */
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
if(context->session_expiry_interval == 0){
|
||||||
|
/* Client session is due to be expired now */
|
||||||
if(context->will_delay_interval == 0){
|
if(context->will_delay_interval == 0){
|
||||||
/* This will be done later, after the will is published for delay>0. */
|
/* This will be done later, after the will is published for delay>0. */
|
||||||
context__add_to_disused(context);
|
context__add_to_disused(context);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}else{
|
}else{
|
||||||
session_expiry__add(context);
|
session_expiry__add(context);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
keepalive__remove(context);
|
keepalive__remove(context);
|
||||||
mosquitto__set_state(context, mosq_cs_disconnected);
|
mosquitto__set_state(context, mosq_cs_disconnected);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user