mirror of
https://github.com/scottchiefbaker/ESP-WebOTA.git
synced 2024-08-30 18:12:33 +00:00
Add a small delay after updates so Curl is happy
This commit is contained in:
parent
0677169cfe
commit
414573746b
@ -165,7 +165,8 @@ int add_http_routes(WebServer *server, const char *path) {
|
|||||||
|
|
||||||
// Handling uploading firmware file
|
// Handling uploading firmware file
|
||||||
server->on(path, HTTP_POST, [server]() {
|
server->on(path, HTTP_POST, [server]() {
|
||||||
server->send(200, "text/plain", (Update.hasError()) ? "FAIL" : "OK");
|
server->send(200, "text/plain", (Update.hasError()) ? "Update: fail" : "Update: OK!");
|
||||||
|
delay(500);
|
||||||
ESP.restart();
|
ESP.restart();
|
||||||
}, [server]() {
|
}, [server]() {
|
||||||
HTTPUpload& upload = server->upload();
|
HTTPUpload& upload = server->upload();
|
||||||
|
Loading…
Reference in New Issue
Block a user