Use do_disconnect() for websockets.

This commit is contained in:
Roger A. Light
2014-07-08 23:18:11 +01:00
parent 95a4ec431d
commit 9bb336bbf3
+1 -8
View File
@@ -294,14 +294,7 @@ static int callback_mqtt(struct libwebsocket_context *context,
mosq->last_msg_in = mosquitto_time();
if(rc){
if(db->config->connection_messages == true){
if(mosq->state != mosq_cs_disconnecting){
_mosquitto_log_printf(NULL, MOSQ_LOG_NOTICE, "Socket error on client %s, disconnecting.", mosq->id);
}else{
_mosquitto_log_printf(NULL, MOSQ_LOG_NOTICE, "Client %s disconnected.", mosq->id);
}
}
mqtt3_context_disconnect(db, mosq);
do_disconnect(db, mosq);
return -1;
}
}