From 41483b1b191f37a5dea38be8c2657467f565e437 Mon Sep 17 00:00:00 2001 From: iranl Date: Thu, 1 Aug 2024 15:51:28 +0200 Subject: [PATCH] Update WebCfgServer.cpp --- src/WebCfgServer.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/WebCfgServer.cpp b/src/WebCfgServer.cpp index f497d28..7362c85 100644 --- a/src/WebCfgServer.cpp +++ b/src/WebCfgServer.cpp @@ -314,6 +314,7 @@ void WebCfgServer::initialize() String response = ""; buildConfirmHtml(response, "Rebooting to other partition", 2); _server.send(200, "text/html", response); + waitAndProcess(true, 1000); esp_ota_set_boot_partition(esp_ota_get_next_update_partition(NULL)); restartEsp(RestartReason::OTAReboot); }); @@ -343,6 +344,7 @@ void WebCfgServer::initialize() _preferences->putString(preference_ota_main_url, GITHUB_LATEST_RELEASE_BINARY_URL); } _server.send(200, "text/html", response); + waitAndProcess(true, 1000); restartEsp(RestartReason::OTAReboot); }); #endif