Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialize last value to millis() #10

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Initialize last value to millis()
  • Loading branch information
jamesfowkes committed Jul 23, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 830a1d4a2930bd56c8db76ae27cc85064f585fcc
2 changes: 1 addition & 1 deletion src/WebOTA.cpp
Original file line number Diff line number Diff line change
@@ -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();