move finalExitCallbacks to CMU implementation

This commit is contained in:
David Rose 2009-12-07 20:21:01 +00:00
parent 681dc378dc
commit e90652e89e
3 changed files with 4 additions and 2 deletions

View File

@ -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.

View File

@ -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).

View File

@ -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