We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 78aeaf5 commit d0da988Copy full SHA for d0da988
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