Don't log the 'scheduling reconnect' message if the world is dying.

This commit is contained in:
Jeremy Fincher 2003-12-03 22:29:49 +00:00
parent 32eaa11322
commit 8fc9b00c03
2 changed files with 5 additions and 2 deletions

View File

@ -76,6 +76,7 @@ class AsyncoreDriver(asynchat.async_chat, object):
def scheduleReconnect(self):
when = time.time() + 60
whenS = time.strftime(conf.logTimestampFormat, time.localtime(when))
if not world.dying:
log.info('Scheduling reconnect to %s at %s', self.server, whenS)
def makeNewDriver():
self.irc.reset()

View File

@ -45,6 +45,7 @@ from itertools import imap
import log
import conf
import world
import drivers
import ircmsgs
import schedule
@ -134,6 +135,7 @@ class SocketDriver(drivers.IrcDriver):
self.connected = False
when = time.time() + self.reconnectWaits[self.reconnectWaitsIndex]
whenS = time.strftime(conf.logTimestampFormat, time.localtime(when))
if not world.dying:
log.info('Scheduling reconnect to %s at %s', self.server, whenS)
schedule.addEvent(self.reconnect, when)