mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-19 09:42:11 +03:00
Fix issue on write error
This commit is contained in:
@ -70,12 +70,17 @@ size_t WiFiClient::write(const uint8_t *buf, size_t size) {
|
||||
}
|
||||
|
||||
|
||||
if ((!ServerDrv::sendData(_sock, buf, size)) ||
|
||||
(!ServerDrv::checkDataSent(_sock)))
|
||||
if (!ServerDrv::sendData(_sock, buf, size))
|
||||
{
|
||||
setWriteError();
|
||||
return 0;
|
||||
}
|
||||
if (!ServerDrv::checkDataSent(_sock))
|
||||
{
|
||||
setWriteError();
|
||||
return 0;
|
||||
}
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user