Skip to content

Commit

Permalink
mshoe007 convinced me... should fix #8
Browse files Browse the repository at this point in the history
  • Loading branch information
scottchiefbaker committed Apr 29, 2020
1 parent 323ccbe commit 59033c6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/WebOTA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ int WebOTA::add_http_routes(WebServer *server, const char *path) {
// If the MCU is in a delay() it cannot respond to HTTP OTA requests
// We do a "fake" looping delay and listen for incoming HTTP requests while waiting
void WebOTA::delay(unsigned int ms) {
unsigned int last = millis();
// Borrowed from mshoe007 @ https://github.com/scottchiefbaker/ESP-WebOTA/issues/8
decltype(millis()) last;

while ((millis() - last) < ms) {
OTAServer.handleClient();
Expand Down

0 comments on commit 59033c6

Please sign in to comment.