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"

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
nathan 2023-07-10 23:26:54 -04:00 committed by Ludovic Courtès
parent 7d9fdfb19d
commit 9cf2f08852
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5

View File

@ -84,7 +84,9 @@ when STOP-LOOP? procedure returns true."
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."