Fix missing errors for websockets.

This commit is contained in:
Roger A. Light 2019-04-17 09:43:38 +01:00
parent 8531cb1d79
commit 32fde3885c

View File

@ -260,7 +260,7 @@ static int callback_mqtt(struct libwebsocket_context *context,
#ifdef WITH_TLS #ifdef WITH_TLS
mosq->ssl = NULL; mosq->ssl = NULL;
#endif #endif
do_disconnect(db, mosq); do_disconnect(db, mosq, MOSQ_ERR_CONN_LOST);
} }
break; break;
@ -425,7 +425,7 @@ static int callback_mqtt(struct libwebsocket_context *context,
} }
libwebsocket_callback_on_writable(mosq->ws_context, mosq->wsi); libwebsocket_callback_on_writable(mosq->ws_context, mosq->wsi);
} else if (rc) { } else if (rc) {
do_disconnect(db, mosq); do_disconnect(db, mosq, MOSQ_ERR_CONN_LOST);
return -1; return -1;
} }
} }