Skip to content

Commit

Permalink
Roll-back of arduino-libraries#53 because of arduino-libraries#87
Browse files Browse the repository at this point in the history
  • Loading branch information
ocrdu committed Apr 26, 2021
1 parent d57e172 commit b7a5085
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
17 changes: 1 addition & 16 deletions src/WiFiServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ extern "C" {

WiFiServer::WiFiServer(uint16_t port) :
_sock(NO_SOCKET_AVAIL),
_lastSock(NO_SOCKET_AVAIL)
{
_port = port;
}
Expand All @@ -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) {
Expand All @@ -72,8 +59,6 @@ WiFiClient WiFiServer::available(byte* status)
*status = client.status();
}

_lastSock = sock;

return client;
}

Expand Down
1 change: 0 additions & 1 deletion src/WiFiServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ class WiFiClient;
class WiFiServer : public Server {
private:
uint8_t _sock;
uint8_t _lastSock;
uint16_t _port;
void* pcb;
public:
Expand Down

0 comments on commit b7a5085

Please sign in to comment.