mirror of
https://github.com/ansible/awx.git
synced 2026-01-15 20:00:43 -03:30
Copy socket list in place to prevent a runtimeerror when the socket list
gets updated in the middle of notifications Fixes https://trello.com/c/Q0bwCU9R/61-traceback-from-run-socketio-service
This commit is contained in:
parent
dc661e6ba5
commit
92117ae460
@ -76,7 +76,7 @@ def notification_handler(bind_port, server):
|
||||
while True:
|
||||
message = handler_socket.recv_json()
|
||||
packet = dict(type='event', name=message['event'], endpoint=message['endpoint'], args=message)
|
||||
for session_id, socket in server.sockets.iteritems():
|
||||
for session_id, socket in list(server.sockets.iteritems()):
|
||||
socket.send_packet(packet)
|
||||
|
||||
class Command(NoArgsCommand):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user