diff --git a/wsdiscovery/threaded.py b/wsdiscovery/threaded.py index 0b309e5..b33de81 100644 --- a/wsdiscovery/threaded.py +++ b/wsdiscovery/threaded.py @@ -121,7 +121,15 @@ def _createMulticastOutSocket(self, addr, ttl): else: iface = int(addr.scope_id) - sock.setsockopt(ip_proto, self._get_multicast(), iface) + try: + sock.setsockopt(ip_proto, self._get_multicast(), iface) + except OSError as e: + logger.warning( + "Interface for %s does not support " + "multicast flags or is not UP: OSError %s", + addr, + e + ) return sock