Commit 611db61d authored by chemicstry's avatar chemicstry Committed by Me No Dev

Fix WiFiClient error handling (#1388)

parent 00f96243
......@@ -313,7 +313,7 @@ uint8_t WiFiClient::connected()
if (_connected) {
uint8_t dummy;
int res = recv(fd(), &dummy, 0, MSG_DONTWAIT);
if (res <= 0) {
if (res < 0) {
switch (errno) {
case ENOTCONN:
case EPIPE:
......@@ -328,7 +328,6 @@ uint8_t WiFiClient::connected()
}
}
else {
// Should never happen since requested 0 bytes
_connected = true;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment