Ferenc Szontágh
2024-06-27 0c428a79ef2379c6c7be29712e83f8c39e43c580
src/Server.cpp
@@ -13,7 +13,7 @@
    signal(SIGUSR1, Server::handleSignal);
    if (!config.loadFromFile("/etc/fserver/config.json"))
    {
        std::cerr << "Failed to load config.json" << std::endl;
        LOG(ERROR) << "Failed to load /etc/fserver/config.json";
    }
    loadPlugins();
    for (int i = 0; i < 4; ++i)
@@ -54,7 +54,6 @@
{
    if (config.loadFromFile("/etc/fserver/config.json"))
    {
        // std::cout << "Configuration reloaded." << std::endl;
        LOG(INFO) << "Configuration reloaded /etc/fserver/config.json";
        // Stop and clear existing plugins
@@ -144,7 +143,7 @@
{
    if (signal == SIGUSR1)
    {
        std::cout << "Received signal to reload configuration." << std::endl;
        LOG(INFO) << "Reloading config file by SIGUSR1";
        Server::getInstance().reloadConfigFlag.store(true);
    }
}