From 0f945433f816615c269aa86516c605e173fec2f6 Mon Sep 17 00:00:00 2001 From: cyberman54 Date: Sun, 7 Mar 2021 19:07:10 +0100 Subject: [PATCH] maintenance mode (http keep-alive) --- src/boot.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/boot.cpp b/src/boot.cpp index b4ebd560..b1c0cb9c 100644 --- a/src/boot.cpp +++ b/src/boot.cpp @@ -120,14 +120,14 @@ void start_boot_menu(void) { // send start button page server.on("/", HTTP_GET, [&server, &loginMenu]() { - server.sendHeader("Connection", "close"); + server.sendHeader("Connection", "keep-alive"); server.send(200, "text/html", loginMenu); }); // send upload button page server.on("/serverIndex", HTTP_GET, [&server, &serverIndex, &timer]() { timerAlarmWrite(timer, BOOTTIMEOUT * 1000000, false); - server.sendHeader("Connection", "close"); + server.sendHeader("Connection", "keep-alive"); server.send(200, "text/html", serverIndex); }); @@ -137,7 +137,6 @@ void start_boot_menu(void) { [&server]() { server.sendHeader("Connection", "close"); server.send(200, "text/plain", (Update.hasError()) ? "FAIL" : "OK"); - delay(5000); WiFi.disconnect(true); if (!Update.hasError()) RTC_runmode = RUNMODE_POWERCYCLE;