From 0401f766211a52da9d053b776e6605c0f1ffe009 Mon Sep 17 00:00:00 2001 From: j Date: Wed, 23 Mar 2016 19:48:15 +0100 Subject: [PATCH] wait for Zeroconf to init before registering service --- oml/localnodes.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/oml/localnodes.py b/oml/localnodes.py index 2863761..f3e3ccb 100644 --- a/oml/localnodes.py +++ b/oml/localnodes.py @@ -2,6 +2,7 @@ # vi:si:et:sw=4:sts=4:ts=4 import socket +import time from zeroconf import ( get_all_addresses, @@ -58,6 +59,7 @@ class LocalNodes(dict): def setup(self): self.local_ips = sorted(get_all_addresses(socket.AF_INET)) self.zeroconf = Zeroconf() + time.sleep(0.02) self.register_service() self.browse()