diff --git a/src/WiFiServer.cpp b/src/WiFiServer.cpp index 729958b..d829633 100644 --- a/src/WiFiServer.cpp +++ b/src/WiFiServer.cpp @@ -31,7 +31,6 @@ extern "C" { WiFiServer::WiFiServer(uint16_t port) : _sock(NO_SOCKET_AVAIL), - _lastSock(NO_SOCKET_AVAIL) { _port = port; } @@ -50,19 +49,7 @@ WiFiClient WiFiServer::available(byte* status) int sock = NO_SOCKET_AVAIL; if (_sock != NO_SOCKET_AVAIL) { - // check previous received client socket - if (_lastSock != NO_SOCKET_AVAIL) { - WiFiClient client(_lastSock); - - if (client.connected() && client.available()) { - sock = _lastSock; - } - } - - if (sock == NO_SOCKET_AVAIL) { - // check for new client socket - sock = ServerDrv::availServer(_sock); - } + sock = ServerDrv::availServer(_sock); } if (sock != NO_SOCKET_AVAIL) { @@ -72,8 +59,6 @@ WiFiClient WiFiServer::available(byte* status) *status = client.status(); } - _lastSock = sock; - return client; } diff --git a/src/WiFiServer.h b/src/WiFiServer.h index d60f558..f47c8fd 100644 --- a/src/WiFiServer.h +++ b/src/WiFiServer.h @@ -32,7 +32,6 @@ class WiFiClient; class WiFiServer : public Server { private: uint8_t _sock; - uint8_t _lastSock; uint16_t _port; void* pcb; public: