forked from Links2004/arduinoWebSockets
Update WebSocketsServer.cpp
Created a dummy client in order to be able to drop the TCP Client.
This commit is contained in:
@ -619,6 +619,10 @@ WSclient_t * WebSocketsServerCore::handleNewClient(WEBSOCKETS_NETWORK_CLASS * tc
|
|||||||
#else
|
#else
|
||||||
DEBUG_WEBSOCKETS("[WS-Server] no free space new client\n");
|
DEBUG_WEBSOCKETS("[WS-Server] no free space new client\n");
|
||||||
#endif
|
#endif
|
||||||
|
// no client! => create dummy!
|
||||||
|
WSclient_t dummy = WSclient_t();
|
||||||
|
client = & dummy;
|
||||||
|
client->tcp = tcpClient;
|
||||||
dropNativeClient(client);
|
dropNativeClient(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user