1
0
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:
Mimmo La Fauci
2012-06-07 00:55:35 +02:00
parent 970dd043ce
commit 28df8dc4b1
2 changed files with 10 additions and 5 deletions

View File

@ -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;
}