Subject: [PATCH] fix `guix publish --advertise'

From: nathan <[email-masked]>
Date: Tue, 11 Jul 2023 00:01:43 -0400

Simple oversight.
Since 0ae419877ce070721f8e5404c2fe7d721a22f998, timeout will be #f with `guix publish --advertise'.
>From aa385273da1e97c5e69c34582611c7adf99ebbb4 Mon Sep 17 00:00:00 2001
From: nathan <[email-masked]>
Date: Mon, 10 Jul 2023 23:26:54 -0400
Subject: [PATCH] avahi: fix exception when timeout is #f

* guix/avahi.scm (avahi-publish-service-thread): Fixes crash when timeout is
  #f, which is the default for "guix publish --advertise"
---
 guix/avahi.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/guix/avahi.scm b/guix/avahi.scm
index 502b0b9dcd..574fe0b850 100644
--- a/guix/avahi.scm
+++ b/guix/avahi.scm
@@ -84,7 +84,9 @@ (define client-callback
                                   client-flag/ignore-user-config)
                                  client-callback)))
        (while (not (stop-loop?))
-         (iterate-simple-poll poll timeout))))))
+         (if timeout
+             (iterate-simple-poll poll timeout)
+             (iterate-simple-poll poll)))))))
 
 (define (interface->ip-address interface)
   "Return the local IP address of the given INTERFACE."
-- 
2.41.0