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

Break on any error when flushing a client

上级 6fc96b97
......@@ -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();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册