From d0bd8dc0460b799a81c80fb1230bdc44e684731a Mon Sep 17 00:00:00 2001 From: David Rose Date: Fri, 28 May 2010 16:58:31 +0000 Subject: [PATCH] impossible things happen sometimes? --- direct/src/distributed/ServerRepository.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/direct/src/distributed/ServerRepository.py b/direct/src/distributed/ServerRepository.py index ab5b2372c8..f155364704 100644 --- a/direct/src/distributed/ServerRepository.py +++ b/direct/src/distributed/ServerRepository.py @@ -346,16 +346,18 @@ class ServerRepository: client = self.clientsByConnection.get(datagram.getConnection()) + if not client: + # This shouldn't be possible, though it appears to happen + # sometimes? + self.notify.warning( + "Ignoring datagram from unknown connection %s" % (datagram.getConnection())) + return + if self.notify.getDebug(): self.notify.debug( "ServerRepository received datagram from %s:" % (client.doIdBase)) #datagram.dumpHex(ostream) - if not client: - # This shouldn't be possible. - self.notify.error( - "Received datagram from unknown connection.") - dgi = DatagramIterator(datagram) type = dgi.getUint16()