mirror of
https://github.com/0xFEEDC0DE64/arduino-esp32.git
synced 2025-06-28 03:10:59 +02:00
Break on any error when flushing a client
This commit is contained in:
@ -266,12 +266,9 @@ void WiFiClient::flush() {
|
||||
while(a){
|
||||
toRead = (a>WIFI_CLIENT_FLUSH_BUFFER_SIZE)?WIFI_CLIENT_FLUSH_BUFFER_SIZE:a;
|
||||
if(recv(fd(), buf, toRead, MSG_DONTWAIT) < 0) {
|
||||
if(errno != EWOULDBLOCK){
|
||||
log_e("%d", errno);
|
||||
stop();
|
||||
break;
|
||||
}
|
||||
delay(1);//give some time
|
||||
log_e("%d", errno);
|
||||
stop();
|
||||
break;
|
||||
}
|
||||
a = available();
|
||||
}
|
||||
|
Reference in New Issue
Block a user