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