Fix MOSQ_EVT_DISCONNECT being called before MOSQ_EVT_ACL_CHECK

This occurs for the will of that client.

Closes #3487. Thanks to ChrisBFX.
This commit is contained in:
Roger A. Light
2026-02-11 14:43:57 +00:00
committed by Roger Light
parent 5b74cce8a4
commit 5f2a45d96a
2 changed files with 10 additions and 1 deletions
+8
View File
@@ -1,3 +1,11 @@
2.1.3 - 2026-02-xx
==================
Broker:
- Fix MOSQ_EVT_DISCONNECT being called before MOSQ_EVT_ACL_CHECK for the will
of that client. Closes #3487.
2.1.2 - 2026-02-09
==================
+2 -1
View File
@@ -269,13 +269,14 @@ void context__disconnect(struct mosquitto *context, int reason)
}
}
context__send_will(context);
if(context->session_expiry_interval == MQTT_SESSION_EXPIRY_IMMEDIATE){
plugin__handle_disconnect(context, reason);
}else{
plugin__handle_client_offline(context, reason);
}
context__send_will(context);
net__socket_close(context);
#ifdef WITH_BRIDGE
if(context->bridge == NULL)