mirror of
https://github.com/xcat2/confluent.git
synced 2025-08-21 10:40:28 +00:00
Background redfish check on snoop
When snooping, if a redfish device comes along, background the query so that it is unable to block the main SSDP receive routine.
This commit is contained in:
@@ -108,12 +108,15 @@ def _process_snoop(peer, rsp, mac, known_peers, newmacs, peerbymacaddress, byeha
|
||||
if not value.endswith('/DeviceDescription.json'):
|
||||
return
|
||||
if handler:
|
||||
retdata = check_fish(('/DeviceDescription.json', peerdata))
|
||||
if retdata:
|
||||
known_peers.add(peer)
|
||||
newmacs.add(mac)
|
||||
peerbymacaddress[mac] = retdata
|
||||
machandlers[mac] = handler
|
||||
eventlet.spawn_n(check_fish_handler, handler, peerdata, known_peers, newmacs, peerbymacaddress, machandlers, mac)
|
||||
|
||||
def check_fish_handler(handler, peerdata, known_peers, newmacs, peerbymacaddress, machandlers, mac):
|
||||
retdata = check_fish(('/DeviceDescription.json', peerdata))
|
||||
if retdata:
|
||||
known_peers.add(peer)
|
||||
newmacs.add(mac)
|
||||
peerbymacaddress[mac] = retdata
|
||||
machandlers[mac] = handler
|
||||
|
||||
|
||||
def snoop(handler, byehandler=None, protocol=None, uuidlookup=None):
|
||||
|
Reference in New Issue
Block a user