From a7ba5a0f25f1862a3b0e2e73f34336355b166e3b Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Thu, 15 Jan 2004 12:55:19 +0000 Subject: [PATCH] Made world cleanup drivers, too. --- src/world.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/world.py b/src/world.py index ba87bedc1..f1df509ea 100644 --- a/src/world.py +++ b/src/world.py @@ -49,6 +49,7 @@ import threading import log import conf +import drivers import ircutils socket.setdefaulttimeout(10) @@ -94,6 +95,12 @@ def upkeep(): log.info('%s upkeep ran.', time.strftime(conf.logTimestampFormat)) return collected +def makeDriversDie(): + """Kills drivers.""" + log.info('Killing Driver objects.') + for driver in drivers._drivers.itervalues(): + driver.die() + def makeIrcsDie(): """Kills Ircs.""" log.info('Killing Irc objects.') @@ -112,6 +119,7 @@ def finished(): atexit.register(finished) atexit.register(upkeep) atexit.register(makeIrcsDie) +atexit.register(makeDriversDie) atexit.register(startDying) ##################################################