Copy a set to prevent changes of set's size.

This commit is contained in:
Yuxin Wang 2018-10-01 20:45:53 -04:00
parent 90095353a2
commit 4819f1fb0b

View file

@ -46,7 +46,7 @@ class MessageServer:
for client in self._connections:
client.close()
for thread in self._threads:
for thread in set(self._threads):
thread.join()
def _listen(self):