Fix hang on client disconnect during upload (#2914)
This commit is contained in:
		
							parent
							
								
									c29ec9da3d
								
							
						
					
					
						commit
						e1548e9b7e
					
				| @ -303,6 +303,7 @@ void WebServer::_uploadWriteByte(uint8_t b){ | ||||
| } | ||||
| 
 | ||||
| int WebServer::_uploadReadByte(WiFiClient& client){ | ||||
|   if (!client.connected()) return -1; | ||||
|   int res = client.read(); | ||||
|   if(res < 0) { | ||||
|     // keep trying until you either read a valid byte or timeout
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user