From 3120eda9aee9066c30f5cf50c8a57aad1d65e766 Mon Sep 17 00:00:00 2001 From: totaam Date: Fri, 12 May 2023 15:16:04 +0700 Subject: [PATCH] stop as soon as we find a valid backend --- xpra/net/socket_util.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xpra/net/socket_util.py b/xpra/net/socket_util.py index 1db157f4b5..3941aca3b1 100644 --- a/xpra/net/socket_util.py +++ b/xpra/net/socket_util.py @@ -829,7 +829,7 @@ def mdns_publish(display_name, listen_on, text_dict=None): except ImportError as e: log(f"mdns support is not installed: {e}") return () - PREFER_ZEROCONF = envbool("XPRA_PREFER_ZEROCONF", True) + PREFER_ZEROCONF = envbool("XPRA_PREFER_ZEROCONF", False) imports = [import_zeroconf, import_avahi] if not PREFER_ZEROCONF: imports = reversed(imports) @@ -838,6 +838,7 @@ def mdns_publish(display_name, listen_on, text_dict=None): for i in imports: try: MDNSPublishers, get_interface_index = i() + break except ImportError as e: log("mdns import failure", exc_info=True) exceptions.append(e)