impossible things happen sometimes?

This commit is contained in:
David Rose 2010-05-28 16:58:31 +00:00
parent 6b1b945a77
commit d0bd8dc046

View File

@ -346,16 +346,18 @@ class ServerRepository:
client = self.clientsByConnection.get(datagram.getConnection()) 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(): if self.notify.getDebug():
self.notify.debug( self.notify.debug(
"ServerRepository received datagram from %s:" % (client.doIdBase)) "ServerRepository received datagram from %s:" % (client.doIdBase))
#datagram.dumpHex(ostream) #datagram.dumpHex(ostream)
if not client:
# This shouldn't be possible.
self.notify.error(
"Received datagram from unknown connection.")
dgi = DatagramIterator(datagram) dgi = DatagramIterator(datagram)
type = dgi.getUint16() type = dgi.getUint16()