From d8ef39b8bc512e643ae43908576ac23a4da0f422 Mon Sep 17 00:00:00 2001 From: Rene Zeldenthuis Date: Sat, 10 Sep 2022 23:53:31 +0200 Subject: [PATCH] Readded config changed check for reboot. --- src/main.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index db6fea3..1401e42 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -86,13 +86,13 @@ void handle_root() void handle_restart() { log_v("Handle restart"); - // if (!config_changed) - // { - // Redirect to root page. - // web_server.sendHeader("Location", "/", true); - // web_server.send(302, "text/plain", ""); - // return; - // } + if (!config_changed) + { + // Redirect to root page + web_server.sendHeader("Location", "/", true); + web_server.send(302, "text/plain", ""); + return; + } const template_variable_t substitutions[] = { {"AppTitle", APP_TITLE}, @@ -106,7 +106,7 @@ void handle_restart() web_server.send(200, "text/html", html); log_v("Restarting... Press refresh to connect again"); sleep(1000); - // ESP.restart(); + ESP.restart(); } void on_config_saved()