We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5cdcdbc commit 4519a30Copy full SHA for 4519a30
src/EthernetClient.cpp
@@ -60,7 +60,7 @@ int EthernetClient::connect(IPAddress ip, uint16_t port)
60
uint8_t stat = Ethernet.socketStatus(sockindex);
61
if (stat == SnSR::ESTABLISHED) return 1;
62
if (stat == SnSR::CLOSE_WAIT) return 1;
63
- if (stat == SnSR::CLOSED) return 0;
+ if (stat == SnSR::CLOSED) { sockindex = MAX_SOCK_NUM; return 0; }
64
if (millis() - start > _timeout) break;
65
delay(1);
66
}
0 commit comments