Alternative Improve _uploadReadByte (#2656)

* add opportunity for more than one retry to _uploadReadByte

* an alternative timeout-based method to making _uploadReadByte more resilient

* move timing variables in the correct scope

* implement and use client.getTimeout instead of hard-coded timeout in _uploadReadByte

* add missing return

* some refactoring to address respecting the timeout in a potentially deadlocked connection

* fix spelling in comment

* address review comments; move impl to cpp file for getTimeout, and remove local variable for currentMillis

* remove redundant cast

* need to check for timeout outside the inner while as well

* update WebUpdate example to print something in unexpected callback condition

* update log_e messages per review comments
This commit is contained in:
Victor Aprea
2019-04-12 06:45:35 -04:00
committed by Me No Dev
parent e0beac88c9
commit 25c0b52212
5 changed files with 47 additions and 12 deletions

View File

@ -50,6 +50,8 @@ void setup(void) {
Update.printError(Serial);
}
Serial.setDebugOutput(false);
} else {
Serial.printf("Update Failed Unexpectedly (likely broken connection): status=%d\n", upload.status);
}
});
server.begin();