mirror of https://github.com/noisymime/Arduino.git
Fix for CLOSE_WAIT Bug
Fir for an EthernetClient bug, as per the following thread http://forum.freetronics.com/viewtopic.php?t=176 Kudos to mr-russ for finding a fix.
This commit is contained in:
parent
ad1d5ca89d
commit
47c46c4f25
|
@ -41,7 +41,7 @@ int EthernetClient::connect(IPAddress ip, uint16_t port) {
|
||||||
|
|
||||||
for (int i = 0; i < MAX_SOCK_NUM; i++) {
|
for (int i = 0; i < MAX_SOCK_NUM; i++) {
|
||||||
uint8_t s = W5100.readSnSR(i);
|
uint8_t s = W5100.readSnSR(i);
|
||||||
if (s == SnSR::CLOSED || s == SnSR::FIN_WAIT) {
|
if (s == SnSR::CLOSED || s == SnSR::FIN_WAIT || s == SnSR::CLOSE_WAIT) {
|
||||||
_sock = i;
|
_sock = i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue