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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user