Update WebCfgServer.cpp

This commit is contained in:
iranl
2024-08-01 15:51:28 +02:00
committed by GitHub
parent dd895a5c0d
commit 41483b1b19

View File

@@ -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