fix webSocket 8266

This commit is contained in:
Mit4el
2025-01-07 17:05:18 +03:00
parent 96b8311579
commit 3791fe29ad

View File

@@ -671,7 +671,11 @@ void WebSocketsServer::handleNewClients(void) {
#endif #endif
// store new connection // store new connection
WEBSOCKETS_NETWORK_CLASS * tcpClient = new WEBSOCKETS_NETWORK_CLASS(_server->accept()); #if(WEBSOCKETS_NETWORK_TYPE == NETWORK_ESP8266)
WEBSOCKETS_NETWORK_CLASS * tcpClient = new WEBSOCKETS_NETWORK_CLASS(_server->available()); //available
#else
WEBSOCKETS_NETWORK_CLASS * tcpClient = new WEBSOCKETS_NETWORK_CLASS(_server->accept()); //available
#endif
if(!tcpClient) { if(!tcpClient) {
DEBUG_WEBSOCKETS("[WS-Client] creating Network class failed!"); DEBUG_WEBSOCKETS("[WS-Client] creating Network class failed!");
return; return;