Browse Source

fixed leaked event logout crash

Darren Ranalli 16 years ago
parent
commit
7747bab024
1 changed files with 4 additions and 1 deletions
  1. 4 1
      direct/src/distributed/ConnectionRepository.py

+ 4 - 1
direct/src/distributed/ConnectionRepository.py

@@ -59,7 +59,7 @@ class ConnectionRepository(
         # Accept this hook so that we can respond to lost-connection
         # events in the main thread, instead of within the network
         # thread (if there is one).
-        self.accept(self.uniqueName('lostConnection'), self.lostConnection)
+        self.accept(self._getLostConnectionEvent(), self.lostConnection)
         
         self.config = config
 
@@ -137,6 +137,9 @@ class ConnectionRepository(
             
         self._gcDefaultThreshold = gc.get_threshold()
 
+    def _getLostConnectionEvent(self):
+        return self.uniqueName('lostConnection')
+
     def _garbageCollect(self, task=None):
         # allow a collect
         # enable automatic garbage collection