This commit is contained in:
		
							parent
							
								
									1287c52933
								
							
						
					
					
						commit
						7e40de226f
					
				| @ -105,7 +105,7 @@ public: | ||||
| 
 | ||||
|     int read(uint8_t * dst, size_t len){ | ||||
|         if(!dst || !len || (_pos == _fill && !fillBuffer())){ | ||||
|             return -1; | ||||
|             return _failed ? -1 : 0; | ||||
|         } | ||||
|         size_t a = _fill - _pos; | ||||
|         if(len <= a || ((len - a) <= (_size - _fill) && fillBuffer() >= (len - a))){ | ||||
| @ -346,6 +346,9 @@ int WiFiClient::read() | ||||
|     if(res < 0) { | ||||
|         return res; | ||||
|     } | ||||
|     if (res == 0) {  //  No data available.
 | ||||
|         return -1; | ||||
|     } | ||||
|     return data; | ||||
| } | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user