Skip to content

Commit 108090e

Browse files
mvermand22Links2004
authored andcommitted
Update WebSocketsServer.cpp
Created a dummy client in order to be able to drop the TCP Client.
1 parent 46b2ae1 commit 108090e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/WebSocketsServer.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,10 @@ WSclient_t * WebSocketsServerCore::handleNewClient(WEBSOCKETS_NETWORK_CLASS * tc
619619
#else
620620
DEBUG_WEBSOCKETS("[WS-Server] no free space new client\n");
621621
#endif
622+
// no client! => create dummy!
623+
WSclient_t dummy = WSclient_t();
624+
client = & dummy;
625+
client->tcp = tcpClient;
622626
dropNativeClient(client);
623627
}
624628

0 commit comments

Comments
 (0)