Don't disconnect clients that are already disconnected.

This prevents the session expiry being extended on SIGHUP.

Closes #1521. Thanks to Christoph Krey.
pull/1691/head
Roger A. Light 6 years ago
parent eeaafed485
commit 4960fc0702

@ -5,6 +5,11 @@ Broker:
correctly. Creating a new user with `-b` worked without problem.
Closes #1664.
- Fix memory leak when connecting clients rejected.
- Don't disconnect clients that are already disconnected. This prevents the
session expiry being extended on SIGHUP. Closes #1521.
1.6.8 - 20191128
================
Client library:
- Don't treat an unexpected PUBACK, PUBREL, or PUBCOMP as a fatal error.

@ -226,6 +226,10 @@ void context__send_will(struct mosquitto_db *db, struct mosquitto *ctxt)
void context__disconnect(struct mosquitto_db *db, struct mosquitto *context)
{
if(mosquitto__get_state(context) == mosq_cs_disconnected){
return;
}
net__socket_close(db, context);
context__send_will(db, context);

Loading…
Cancel
Save