mirror of
https://github.com/ansible/awx.git
synced 2026-03-07 03:31:10 -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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user