server: proxy: Register signal handler after modules finished loading.

This prevents a race where the signal handler free's structs that
modules use while initializing.
This commit is contained in:
Kobi Mizrachi 2020-05-10 08:33:25 +03:00 committed by akallabeth
parent 00c25eada0
commit de0802a352
1 changed files with 2 additions and 2 deletions

View File

@ -94,8 +94,6 @@ int main(int argc, char* argv[])
if (argc >= 2)
config_path = argv[1];
pf_server_register_signal_handlers();
config = pf_server_config_load(config_path);
if (!config)
goto fail;
@ -113,6 +111,8 @@ int main(int argc, char* argv[])
if (!is_all_required_modules_loaded(config))
goto fail;
pf_server_register_signal_handlers();
server = pf_server_new(config);
if (!server)
goto fail;