Add a small delay after updates so Curl is happy

This commit is contained in:
Scott Baker 2019-03-18 09:55:28 -07:00
parent 0677169cfe
commit 414573746b

View File

@ -165,7 +165,8 @@ int add_http_routes(WebServer *server, const char *path) {
// Handling uploading firmware file
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();
}, [server]() {
HTTPUpload& upload = server->upload();