Skip to content

Commit 946e52d

Browse files
committed
Break on any error when flushing a client
1 parent 6fc96b9 commit 946e52d

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

Diff for: libraries/WiFi/src/WiFiClient.cpp

+3-6
Original file line numberDiff line numberDiff line change
@@ -266,12 +266,9 @@ void WiFiClient::flush() {
266266
while(a){
267267
toRead = (a>WIFI_CLIENT_FLUSH_BUFFER_SIZE)?WIFI_CLIENT_FLUSH_BUFFER_SIZE:a;
268268
if(recv(fd(), buf, toRead, MSG_DONTWAIT) < 0) {
269-
if(errno != EWOULDBLOCK){
270-
log_e("%d", errno);
271-
stop();
272-
break;
273-
}
274-
delay(1);//give some time
269+
log_e("%d", errno);
270+
stop();
271+
break;
275272
}
276273
a = available();
277274
}

0 commit comments

Comments
 (0)