mirror of
https://github.com/scottchiefbaker/ESP-WebOTA.git
synced 2024-08-30 18:12:33 +00:00
Merge pull request #10 from jamesfowkes/fix-missing-millis-init
Initialize last value to millis()
This commit is contained in:
commit
8bd9a8cc14
@ -203,7 +203,7 @@ int WebOTA::add_http_routes(WebServer *server, const char *path) {
|
||||
// We do a "fake" looping delay and listen for incoming HTTP requests while waiting
|
||||
void WebOTA::delay(unsigned int ms) {
|
||||
// Borrowed from mshoe007 @ https://github.com/scottchiefbaker/ESP-WebOTA/issues/8
|
||||
decltype(millis()) last;
|
||||
decltype(millis()) last = millis();
|
||||
|
||||
while ((millis() - last) < ms) {
|
||||
OTAServer.handleClient();
|
||||
|
Loading…
x
Reference in New Issue
Block a user