Update WebSocketsServer.cpp

Created a dummy client in order to be able to drop the TCP Client.
This commit is contained in:
mvermand22
2021-09-03 14:23:21 +02:00
committed by Markus
parent 46b2ae1c97
commit 108090e8cf

View File

@ -619,6 +619,10 @@ WSclient_t * WebSocketsServerCore::handleNewClient(WEBSOCKETS_NETWORK_CLASS * tc
#else
DEBUG_WEBSOCKETS("[WS-Server] no free space new client\n");
#endif
// no client! => create dummy!
WSclient_t dummy = WSclient_t();
client = & dummy;
client->tcp = tcpClient;
dropNativeClient(client);
}