From 316d254c64569a0069cef6f4cd026d8ea2d62696 Mon Sep 17 00:00:00 2001 From: Fireclaw Date: Tue, 5 May 2020 17:27:58 +0200 Subject: [PATCH] distributed: Fix two ServerRepository issues in Python 3 --- direct/src/distributed/ServerRepository.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/direct/src/distributed/ServerRepository.py b/direct/src/distributed/ServerRepository.py index 966d22923b..ac0f2c6856 100644 --- a/direct/src/distributed/ServerRepository.py +++ b/direct/src/distributed/ServerRepository.py @@ -628,7 +628,7 @@ class ServerRepository: del self.clientsByConnection[client.connection] del self.clientsByDoIdBase[client.doIdBase] - id = client.doIdBase / self.doIdRange + id = client.doIdBase // self.doIdRange self.idAllocator.free(id) self.qcr.removeConnection(client.connection) @@ -689,7 +689,7 @@ class ServerRepository: def clientHardDisconnectTask(self, task): """ client did not tell us he was leaving but we lost connection to him, so we need to update our data and tell others """ - for client in self.clientsByConnection.values(): + for client in list(self.clientsByConnection.values()): if not self.qcr.isConnectionOk(client.connection): self.handleClientDisconnect(client) return Task.cont