From 0bb1cdb4037a6ec2eee72332a90184e21227bf4a Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 16 Jan 2025 08:38:31 -0400 Subject: [PATCH] MT#55283 fork to background before init HTTP/WS HTTP/WS init creates worker threads, which would be terminated by a fork to background. Reverse the order. Closes #1896 Possibly also relevant to #1895 Change-Id: I30b61e07ad3bed41b6b241e8943ed479277c1474 (cherry picked from commit dd04af11634bb65c17729b52a65ae6ba1a8e55d8) --- daemon/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/daemon/main.c b/daemon/main.c index 2a2143742..ff2341fae 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -1215,12 +1215,12 @@ no_kernel: die("Number of CPU cores is unknown, cannot auto-set socket CPU affinity"); } - if (websocket_init()) - die("Failed to init websocket listener"); - daemonize(); wpidfile(); + if (websocket_init()) + die("Failed to init websocket listener"); + homer_sender_init(&rtpe_config.homer_ep, rtpe_config.homer_protocol, rtpe_config.homer_id); rtcp_init(); // must come after Homer init