Add a reload add-hoc command

This commit is contained in:
Florent Le Coz
2015-02-24 16:28:30 +01:00
parent 9837f611d9
commit 7115aa3b7f
7 changed files with 41 additions and 7 deletions
+2 -6
View File
@@ -3,6 +3,7 @@
#include <network/poller.hpp>
#include <config/config.hpp>
#include <logger/logger.hpp>
#include <utils/reload.hpp>
#include <iostream>
#include <memory>
@@ -123,13 +124,8 @@ int main(int ac, char** av)
}
if (reload)
{
// Closing the config will just force it to be reopened the next time
// a configuration option is needed
log_info("Signal received, reloading the config...");
Config::close();
// Destroy the logger instance, to be recreated the next time a log
// line needs to be written
Logger::instance().reset();
::reload_process();
reload.store(false);
}
// Reconnect to the XMPP server if this was not intended. This may have