Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 611db61

Browse filesBrowse files
chemicstryme-no-dev
authored andcommitted
Fix WiFiClient error handling (espressif#1388)
1 parent 00f9624 commit 611db61
Copy full SHA for 611db61

File tree

Expand file treeCollapse file tree

1 file changed

+1
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-2
lines changed

‎libraries/WiFi/src/WiFiClient.cpp

Copy file name to clipboardExpand all lines: libraries/WiFi/src/WiFiClient.cpp
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ uint8_t WiFiClient::connected()
313313
if (_connected) {
314314
uint8_t dummy;
315315
int res = recv(fd(), &dummy, 0, MSG_DONTWAIT);
316-
if (res <= 0) {
316+
if (res < 0) {
317317
switch (errno) {
318318
case ENOTCONN:
319319
case EPIPE:
@@ -328,7 +328,6 @@ uint8_t WiFiClient::connected()
328328
}
329329
}
330330
else {
331-
// Should never happen since requested 0 bytes
332331
_connected = true;
333332
}
334333
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.