processing client data before potential disconnect

This commit is contained in:
Jozef Sovcik
2018-11-03 13:16:12 +01:00
parent d6dd7be987
commit 1b6b42b877

View File

@ -173,11 +173,13 @@ void WebSocketsClient::loop(void) {
}
} else {
handleClientData();
if (_client.status == WSC_CONNECTED){
handleHBPing();
handleHBTimeout(&_client);
}
handleClientData();
}
}
#endif
@ -726,7 +728,7 @@ void WebSocketsClient::connectedCb() {
}
void WebSocketsClient::connectFailedCb() {
DEBUG_WEBSOCKETS("[WS-Client] connection to %s:%u Faild\n", _host.c_str(), _port);
DEBUG_WEBSOCKETS("[WS-Client] connection to %s:%u Failed\n", _host.c_str(), _port);
}
#if (WEBSOCKETS_NETWORK_TYPE == NETWORK_ESP8266_ASYNC)