From 1578b9c63b7eec9021398a07f8d5b9d809100bed Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 9 Mar 2022 11:01:01 -0500 Subject: [PATCH] Have SSDP ignore multicast disabled interfaces --- confluent_server/confluent/discovery/protocols/ssdp.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/confluent_server/confluent/discovery/protocols/ssdp.py b/confluent_server/confluent/discovery/protocols/ssdp.py index c4297173..dcb2881f 100644 --- a/confluent_server/confluent/discovery/protocols/ssdp.py +++ b/confluent_server/confluent/discovery/protocols/ssdp.py @@ -323,7 +323,11 @@ def _find_service(service, target): msg = smsg.format(mcastv4addr, service) if not isinstance(msg, bytes): msg = msg.encode('utf8') - net4.sendto(msg, (mcastv4addr, 1900)) + try: + net4.sendto(msg, (mcastv4addr, 1900)) + except socket.error as se: + if se.errno != 101: + raise msg = smsg.format(bcast, service) if not isinstance(msg, bytes): msg = msg.encode('utf8')