From ae81cc2644a83dfdfebf4ef6009cfdba68f25308 Mon Sep 17 00:00:00 2001 From: orignal Date: Wed, 11 May 2016 15:33:53 -0400 Subject: [PATCH] windows doesn't support graceful shutdown yet --- HTTPServer.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/HTTPServer.cpp b/HTTPServer.cpp index 7ad8279d..63975722 100644 --- a/HTTPServer.cpp +++ b/HTTPServer.cpp @@ -513,6 +513,7 @@ namespace http { s << " Stop accepting tunnels
\r\n"; else s << " Start accepting tunnels
\r\n"; +#ifndef WIN32 if (Daemon.gracefullShutdownInterval) { s << " Cancel gracefull shutdown ("; s << Daemon.gracefullShutdownInterval; @@ -521,6 +522,7 @@ namespace http { s << " Start gracefull shutdown
\r\n"; } s << " Force shutdown
\r\n"; +#endif } void ShowTransitTunnels (std::stringstream& s) @@ -818,10 +820,14 @@ namespace http { i2p::context.SetAcceptsTunnels (false); else if (cmd == HTTP_COMMAND_SHUTDOWN_START) { i2p::context.SetAcceptsTunnels (false); +#ifndef WIN32 Daemon.gracefullShutdownInterval = 10*60; +#endif } else if (cmd == HTTP_COMMAND_SHUTDOWN_CANCEL) { i2p::context.SetAcceptsTunnels (true); +#ifndef WIN32 Daemon.gracefullShutdownInterval = 0; +#endif } else if (cmd == HTTP_COMMAND_SHUTDOWN_NOW) { Daemon.running = false; } else {