Remove incomplete impl of config hot-reloading

pull/1186/head
Stephen Shelton 4 years ago
parent 6301fefd43
commit 2e75e03434
No known key found for this signature in database
GPG Key ID: EE4BADACCE8B631C

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

Loading…
Cancel
Save