mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-16 11:21:18 +03:00
Returning CLOSE_WAIT clients in Server::available(). (issue #345).
Otherwise, we miss clients that connect, send data, and disconnect before we get around to calling available().
This commit is contained in:
@ -55,7 +55,8 @@ Client Server::available()
|
||||
for (int sock = 0; sock < MAX_SOCK_NUM; sock++) {
|
||||
Client client(sock);
|
||||
if (EthernetClass::_server_port[sock] == _port &&
|
||||
client.status() == SnSR::ESTABLISHED) {
|
||||
(client.status() == SnSR::ESTABLISHED ||
|
||||
client.status() == SnSR::CLOSE_WAIT)) {
|
||||
if (client.available()) {
|
||||
// XXX: don't always pick the lowest numbered socket.
|
||||
return client;
|
||||
|
Reference in New Issue
Block a user