From 5028ed9f07d9745c48e7839651f4bdcfc27e6b26 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 1 Jul 2025 15:45:24 -0400 Subject: [PATCH] Avoid set changed during iteration --- confluent_server/confluent/discovery/protocols/ssdp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/confluent_server/confluent/discovery/protocols/ssdp.py b/confluent_server/confluent/discovery/protocols/ssdp.py index 447aaf5f..acd6b84e 100644 --- a/confluent_server/confluent/discovery/protocols/ssdp.py +++ b/confluent_server/confluent/discovery/protocols/ssdp.py @@ -316,7 +316,7 @@ def snoop(handler, byehandler=None, protocol=None, uuidlookup=None): if not mac: continue _process_snoop(peer, rsp, mac, known_peers, newmacs, peerbymacaddress, byehandler, machandlers, handler) - for mac in newmacs: + for mac in list(newmacs): thehandler = machandlers.get(mac, None) if thehandler: thehandler(peerbymacaddress[mac])