mirror of
https://github.com/0xFEEDC0DE64/arduino-esp32.git
synced 2025-07-13 18:56:30 +02:00
This commit is contained in:
@ -105,7 +105,7 @@ public:
|
|||||||
|
|
||||||
int read(uint8_t * dst, size_t len){
|
int read(uint8_t * dst, size_t len){
|
||||||
if(!dst || !len || (_pos == _fill && !fillBuffer())){
|
if(!dst || !len || (_pos == _fill && !fillBuffer())){
|
||||||
return -1;
|
return _failed ? -1 : 0;
|
||||||
}
|
}
|
||||||
size_t a = _fill - _pos;
|
size_t a = _fill - _pos;
|
||||||
if(len <= a || ((len - a) <= (_size - _fill) && fillBuffer() >= (len - a))){
|
if(len <= a || ((len - a) <= (_size - _fill) && fillBuffer() >= (len - a))){
|
||||||
@ -346,6 +346,9 @@ int WiFiClient::read()
|
|||||||
if(res < 0) {
|
if(res < 0) {
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
if (res == 0) { // No data available.
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user