Update: don't block the system during the Update
Too much traffic triggered the Task watchdog before under good WLAN conditions.
This commit is contained in:
parent
72d0233f52
commit
1c899c1f24
|
@ -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?
|
||||
|
|
Loading…
Reference in a new issue