From 3dbb4bd24aed6ecac3a181c10c7ef6134c17ba87 Mon Sep 17 00:00:00 2001 From: Jesse Schell Date: Fri, 9 Mar 2001 05:00:57 +0000 Subject: [PATCH] *** empty log message *** --- direct/src/distributed/ClientRepository.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/direct/src/distributed/ClientRepository.py b/direct/src/distributed/ClientRepository.py index 6d1749111c..45b597cadb 100644 --- a/direct/src/distributed/ClientRepository.py +++ b/direct/src/distributed/ClientRepository.py @@ -70,6 +70,7 @@ class ClientRepository(DirectObject.DirectObject): return Task.cont def readerPollOnce(self): + self.ensureValidConnection() availGetVal = self.qcr.dataAvailable() if availGetVal: #print "Client: Incoming message!" @@ -81,6 +82,14 @@ class ClientRepository(DirectObject.DirectObject): ClientRepository.notify.warning("getData returned false") return availGetVal + def ensureValidConnection(self): + # Was the connection reset? + if self.qcm.resetConnectionAvailable(): + resetConnectionPointer = PointerToConnection() + if self.qcm.getResetConnection(resetConnectionPointer): + self.fsm.request("noConnection") + return None + def handleDatagram(self, datagram): # This class is meant to be pure virtual, and any classes that # inherit from it need to make their own handleDatagram method