提交 946e52da 编写于 作者: M me-no-dev

Break on any error when flushing a client

上级 6fc96b97
...@@ -266,13 +266,10 @@ void WiFiClient::flush() { ...@@ -266,13 +266,10 @@ void WiFiClient::flush() {
while(a){ while(a){
toRead = (a>WIFI_CLIENT_FLUSH_BUFFER_SIZE)?WIFI_CLIENT_FLUSH_BUFFER_SIZE:a; toRead = (a>WIFI_CLIENT_FLUSH_BUFFER_SIZE)?WIFI_CLIENT_FLUSH_BUFFER_SIZE:a;
if(recv(fd(), buf, toRead, MSG_DONTWAIT) < 0) { if(recv(fd(), buf, toRead, MSG_DONTWAIT) < 0) {
if(errno != EWOULDBLOCK){
log_e("%d", errno); log_e("%d", errno);
stop(); stop();
break; break;
} }
delay(1);//give some time
}
a = available(); a = available();
} }
free(buf); free(buf);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册