Browse Source

move finalExitCallbacks to CMU implementation

David Rose 16 years ago
parent
commit
e90652e89e

+ 2 - 0
direct/src/distributed/ClientRepository.py

@@ -29,6 +29,8 @@ class ClientRepository(ClientRepositoryBase):
         ClientRepositoryBase.__init__(self, dcFileNames = dcFileNames, dcSuffix = dcSuffix, connectMethod = connectMethod, threadedNet = threadedNet)
         self.setHandleDatagramsInternally(False)
 
+        base.finalExitCallbacks.append(self.shutdown)
+
         # The doId allocator.  The CMU LAN server may choose to
         # send us a block of doIds.  If it chooses to do so, then we
         # may create objects, using those doIds.

+ 0 - 2
direct/src/distributed/ConnectionRepository.py

@@ -56,8 +56,6 @@ class ConnectionRepository(
         # the world, helpful for sending messages specific to each one.
         self.uniqueId = hash(self)
 
-        base.finalExitCallbacks.append(self.shutdown)
-
         # 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).

+ 2 - 0
direct/src/distributed/ServerRepository.py

@@ -84,6 +84,8 @@ class ServerRepository:
         if threadedNet is None:
             # Default value.
             threadedNet = config.GetBool('threaded-net', False)
+
+        base.finalExitCallbacks.append(self.shutdown)
         
         # Set up networking interfaces.
         numThreads = 0