Skip to content

Commit

Permalink
Fix hang on client disconnect during upload (#2914)
Browse files Browse the repository at this point in the history
  • Loading branch information
romansavrulin authored and me-no-dev committed Jul 9, 2019
1 parent c29ec9d commit e1548e9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libraries/WebServer/src/Parsing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e1548e9

Please sign in to comment.