Skip to content

Commit fa85b72

Browse files
author
Johann Richard
committed
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.
1 parent d059459 commit fa85b72

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/Ethernet/EthernetClient.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ int EthernetClient::connect(IPAddress ip, uint16_t port) {
4141

4242
for (int i = 0; i < MAX_SOCK_NUM; i++) {
4343
uint8_t s = W5100.readSnSR(i);
44-
if (s == SnSR::CLOSED || s == SnSR::FIN_WAIT) {
44+
if (s == SnSR::CLOSED || s == SnSR::FIN_WAIT || s == SnSR::CLOSE_WAIT) {
4545
_sock = i;
4646
break;
4747
}

0 commit comments

Comments
 (0)