X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/75547270769394b15e275f4817a824dd75ae3f05..5f488a67d8dae833dcd29b65804abf7904a90a86:/projects/stargazer/main.cpp?ds=sidebyside diff --git a/projects/stargazer/main.cpp b/projects/stargazer/main.cpp index b8857633..860800f8 100644 --- a/projects/stargazer/main.cpp +++ b/projects/stargazer/main.cpp @@ -221,7 +221,6 @@ if (getuid()) } SETTINGS_IMPL settings(argc == 2 ? argv[1] : ""); -SETTINGS_IMPL newSettings = settings; if (settings.ReadSettings()) { @@ -339,6 +338,8 @@ while (running) switch (sig) { case SIGHUP: + { + SETTINGS_IMPL newSettings(settings); if (newSettings.ReadSettings()) { STG_LOGGER & WriteServLog = GetStgLogger(); @@ -349,8 +350,10 @@ while (running) WriteServLog("ReadSettings error. %s", newSettings.GetStrError().c_str()); return -1; } + settings = newSettings; traffCnt.Reload(); manager.reload(); + } break; case SIGTERM: running = false;