From 2e75e03434ed24fc74a27c591aadb70285e7eee0 Mon Sep 17 00:00:00 2001 From: Stephen Shelton Date: Thu, 26 Mar 2020 18:57:13 -0600 Subject: [PATCH] Remove incomplete impl of config hot-reloading --- llarp/context.cpp | 39 ++------------------------------------- 1 file changed, 2 insertions(+), 37 deletions(-) diff --git a/llarp/context.cpp b/llarp/context.cpp index da3bdc8bf..9da283f43 100644 --- a/llarp/context.cpp +++ b/llarp/context.cpp @@ -210,43 +210,8 @@ namespace llarp { SigINT(); } - // TODO(despair): implement hot-reloading config on NT -#ifndef _WIN32 - if (sig == SIGHUP) - { - llarp::LogInfo("SIGHUP"); - if (router) - { - router->hiddenServiceContext().ForEachService( - [](const std::string& name, const llarp::service::Endpoint_ptr& ep) -> bool { - ep->ResetInternalState(); - llarp::LogInfo("Reset internal state for ", name); - return true; - }); - router->PumpLL(); - Config newconfig; - if (!newconfig.Load(configfile.c_str())) - { - llarp::LogError("failed to load config file ", configfile); - return; - } - // validate config - if (!router->ValidateConfig(&newconfig)) - { - llarp::LogWarn("new configuration is invalid"); - return; - } - // reconfigure - if (!router->Reconfigure(&newconfig)) - { - llarp::LogError("Failed to reconfigure so we will stop."); - router->Stop(); - return; - } - llarp::LogInfo("router reconfigured"); - } - } -#endif + // TODO: Hot reloading would be kewl + // (it used to exist here, but wasn't maintained) } void