mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-29 18:52:13 +01: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:
parent
bf88db8484
commit
76641d1a87
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user