diff --git a/src/WebSocketsClient.cpp b/src/WebSocketsClient.cpp index 562a661..2be6f32 100644 --- a/src/WebSocketsClient.cpp +++ b/src/WebSocketsClient.cpp @@ -786,9 +786,9 @@ void WebSocketsClient::handleHeader(WSclient_t * client, String * headerLine) { } // falls through case 403: ///< Forbidden - // todo handle login - // falls through - default: ///< Server dont unterstand requrst + // todo handle login + // falls through + default: ///< Server dont unterstand requrst ok = false; DEBUG_WEBSOCKETS("[WS-Client][handleHeader] serverCode is not 101 (%d)\n", client->cCode); clientDisconnect(client); diff --git a/src/WebSocketsServer.cpp b/src/WebSocketsServer.cpp index c206363..c2f533b 100644 --- a/src/WebSocketsServer.cpp +++ b/src/WebSocketsServer.cpp @@ -516,6 +516,9 @@ void WebSocketsServerCore::messageReceived(WSclient_t * client, WSopcode_t opcod * @param client WSclient_t * ptr to the client struct contaning the native client "->tcp" */ void WebSocketsServerCore::dropNativeClient(WSclient_t * client) { + if(!client) { + return; + } if(client->tcp) { if(client->tcp->connected()) { #if(WEBSOCKETS_NETWORK_TYPE != NETWORK_ESP8266_ASYNC) && (WEBSOCKETS_NETWORK_TYPE != NETWORK_ESP32)