From 9bb336bbf3c2cb6b51905962833e1438d6f9a1ef Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Tue, 8 Jul 2014 23:18:11 +0100 Subject: [PATCH] Use do_disconnect() for websockets. --- src/websockets.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/websockets.c b/src/websockets.c index c217049b..379b4d1e 100644 --- a/src/websockets.c +++ b/src/websockets.c @@ -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; } }