diff -r 9ff455817691 -r ea2db66b185f runtime/ServicePublisher.py --- a/runtime/ServicePublisher.py Mon Nov 18 13:52:40 2024 +0100 +++ b/runtime/ServicePublisher.py Mon Nov 18 13:55:51 2024 +0100 @@ -71,12 +71,14 @@ print("MDNS brodcasted service address :" + ip) self.ip_32b = socket.inet_aton(ip) - self.server.register_service( - zeroconf.ServiceInfo(service_type, - self.service_name, - self.port, - addresses=[self.ip_32b], - properties=self.serviceproperties)) + self.service_info = zeroconf.ServiceInfo( + service_type, + self.service_name, + self.port, + addresses=[self.ip_32b], + properties=self.serviceproperties) + + self.server.register_service(self.service_info) self.retrytimer = None def UnRegisterService(self): @@ -84,12 +86,7 @@ self.retrytimer.cancel() if self.server is not None: - self.server.unregister_service( - zeroconf.ServiceInfo(service_type, - self.service_name, - self.ip_32b, - self.port, - properties=self.serviceproperties)) + self.server.unregister_service(self.service_info) self.server.close() self.server = None