8000 processing client data before potential disconnect · sephyrah/arduinoWebSockets@1b6b42b · GitHub
[go: up one dir, main page]

Skip to content

Commit 1b6b42b

Browse files
committed
processing client data before potential disconnect
1 parent d6dd7be commit 1b6b42b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/WebSocketsClient.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,11 +173,13 @@ void WebSocketsClient::loop(void) {
173173

174174
}
175175
} else {
176+
handleClientData();
177+
176178
if (_client.status == WSC_CONNECTED){
177179
handleHBPing();
178180
handleHBTimeout(&_client);
179181
}
180-
handleClientData();
182+
181183
}
182184
}
183185
#endif
@@ -726,7 +728,7 @@ void WebSocketsClient::connectedCb() {
726728
}
727729

728730
void WebSocketsClient::connectFailedCb() {
729-
DEBUG_WEBSOCKETS("[WS-Client] connection to %s:%u Faild\n", _host.c_str(), _port);
731+
DEBUG_WEBSOCKETS("[WS-Client] connection to %s:%u Failed\n", _host.c_str(), _port);
730732
}
731733

732734
#if (WEBSOCKETS_NETWORK_TYPE == NETWORK_ESP8266_ASYNC)

0 commit comments

Comments
 (0)
0