From 00a25487fe59a87e4ccad0f33cc8b869ae6c4893 Mon Sep 17 00:00:00 2001 From: Patrick Nicolas Date: Thu, 14 Nov 2024 17:01:08 +0100 Subject: [PATCH] Fix avahi publishing on reconnect --- server/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/main.cpp b/server/main.cpp index f33f2e9d..ad4c423d 100644 --- a/server/main.cpp +++ b/server/main.cpp @@ -357,6 +357,8 @@ void stop_listening() void start_publishing() { + if (not avahi_publish) + return; if (publisher) return; @@ -638,8 +640,7 @@ int inner_main(int argc, char * argv[], bool show_instructions) g_source_unref(control_listener); // Initialize avahi publisher - if (avahi_publish) - start_publishing(); + start_publishing(); // Initialize listener start_listening();