mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
catch harmless RuntimeError: Set changed size during iteration
This commit is contained in:
parent
40beee630c
commit
ca955b1ff2
|
@ -84,13 +84,15 @@ class ThreadedTCPRequestHandler(socketserver.StreamRequestHandler):
|
||||||
sock_data += b"\n" # append line limiter
|
sock_data += b"\n" # append line limiter
|
||||||
|
|
||||||
# send data to all clients
|
# send data to all clients
|
||||||
# try:
|
try:
|
||||||
for client in CONNECTED_CLIENTS:
|
for client in CONNECTED_CLIENTS:
|
||||||
try:
|
try:
|
||||||
client.send(sock_data)
|
client.send(sock_data)
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
self.log.info("[SCK] Connection lost", e=err)
|
self.log.info("[SCK] Connection lost", e=err)
|
||||||
self.connection_alive = False
|
self.connection_alive = False
|
||||||
|
except Exception as err:
|
||||||
|
self.log.debug("[SCK] catch harmless RuntimeError: Set changed size during iteration", e=err)
|
||||||
|
|
||||||
# we want to transmit scatter data only once to reduce network traffic
|
# we want to transmit scatter data only once to reduce network traffic
|
||||||
static.SCATTER = []
|
static.SCATTER = []
|
||||||
|
|
Loading…
Reference in a new issue