From 1c899c1f24424745693c8d67a22df6069c18edcc Mon Sep 17 00:00:00 2001 From: Thomas Kolb Date: Mon, 2 Dec 2019 20:53:21 +0100 Subject: [PATCH] Update: don't block the system during the Update Too much traffic triggered the Task watchdog before under good WLAN conditions. --- src/UpdateServer.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/UpdateServer.cpp b/src/UpdateServer.cpp index a2ec925..a2121da 100644 --- a/src/UpdateServer.cpp +++ b/src/UpdateServer.cpp @@ -45,10 +45,9 @@ static bool read_n(WiFiClient *client, char *buf, size_t n) Serial.print("/"); Serial.print(n); Serial.println(" total)"); - } else { - Serial.print("."); - delay(1); } + + delay(1); // allow other tasks to run during data reception } return nread == n; @@ -145,9 +144,9 @@ void UpdateServer::updateTask(void *arg) Update.write(buf, bytes_read); bytes_processed += bytes_read; - } else { - delay(1); } + + delay(1); } // all data processed?