dpallot / simple-websocket-server

A python based websocket server that is simple and easy to use.
951 stars 321 forks source link

server close() race condition #85

Open belm0 opened 6 years ago

belm0 commented 6 years ago

observed in the wild:

    File "foo.py", line 16, in bar
      server.close()
    File "/.../python3.6/site-packages/SimpleWebSocketServer/SimpleWebSocketServer.py", line 595, in close
      for desc, conn in self.connections.items():
  RuntimeError: dictionary changed size during iteration
dpallot commented 5 years ago

Are you calling close from another thread context?