2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-01-11 10:32:31 +00:00

Fix a possible breakage due to transmit error

SSDP snoop could have been brought down by
a non-viable transmit, tolerate that failure.
This commit is contained in:
Jarrod Johnson
2025-06-06 10:52:27 -04:00
parent 6a90e1cc77
commit d063f50a9c

View File

@@ -250,7 +250,10 @@ def snoop(handler, byehandler=None, protocol=None, uuidlookup=None):
reply = 'HTTP/1.1 200 OK\r\n\r\nCONFLUENT: PRESENT\r\n'
if not isinstance(reply, bytes):
reply = reply.encode('utf8')
s.sendto(reply, peer)
try:
s.sendto(reply, peer)
except Exception:
break
elif query.startswith('uuid='):
curruuid = query.split('=', 1)[1].lower()
node = uuidlookup(curruuid)