From 0e136bdf9a87e70df4f4078508978b1528eedc00 Mon Sep 17 00:00:00 2001 From: David Rose Date: Tue, 20 Dec 2005 18:36:03 +0000 Subject: [PATCH] don't send zero-length datagrams --- direct/src/distributed/ConnectionRepository.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/direct/src/distributed/ConnectionRepository.py b/direct/src/distributed/ConnectionRepository.py index 60f8f3ea57..144f171783 100644 --- a/direct/src/distributed/ConnectionRepository.py +++ b/direct/src/distributed/ConnectionRepository.py @@ -504,13 +504,14 @@ class ConnectionRepository( pass def send(self, datagram): - if ConnectionRepository.notify.getDebug(): - print "ConnectionRepository sending datagram:" - datagram.dumpHex(ostream) - - self.sendDatagram(datagram) - + # Zero-length datagrams might freak out the server. No point + # in sending them, anyway. + if datagram.getLength() > 0: + if ConnectionRepository.notify.getDebug(): + print "ConnectionRepository sending datagram:" + datagram.dumpHex(ostream) + self.sendDatagram(datagram) # debugging funcs for simulating a network-plug-pull def pullNetworkPlug(self):