mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
Don't log the 'scheduling reconnect' message if the world is dying.
This commit is contained in:
parent
32eaa11322
commit
8fc9b00c03
@ -76,6 +76,7 @@ class AsyncoreDriver(asynchat.async_chat, object):
|
|||||||
def scheduleReconnect(self):
|
def scheduleReconnect(self):
|
||||||
when = time.time() + 60
|
when = time.time() + 60
|
||||||
whenS = time.strftime(conf.logTimestampFormat, time.localtime(when))
|
whenS = time.strftime(conf.logTimestampFormat, time.localtime(when))
|
||||||
|
if not world.dying:
|
||||||
log.info('Scheduling reconnect to %s at %s', self.server, whenS)
|
log.info('Scheduling reconnect to %s at %s', self.server, whenS)
|
||||||
def makeNewDriver():
|
def makeNewDriver():
|
||||||
self.irc.reset()
|
self.irc.reset()
|
||||||
|
@ -45,6 +45,7 @@ from itertools import imap
|
|||||||
|
|
||||||
import log
|
import log
|
||||||
import conf
|
import conf
|
||||||
|
import world
|
||||||
import drivers
|
import drivers
|
||||||
import ircmsgs
|
import ircmsgs
|
||||||
import schedule
|
import schedule
|
||||||
@ -134,6 +135,7 @@ class SocketDriver(drivers.IrcDriver):
|
|||||||
self.connected = False
|
self.connected = False
|
||||||
when = time.time() + self.reconnectWaits[self.reconnectWaitsIndex]
|
when = time.time() + self.reconnectWaits[self.reconnectWaitsIndex]
|
||||||
whenS = time.strftime(conf.logTimestampFormat, time.localtime(when))
|
whenS = time.strftime(conf.logTimestampFormat, time.localtime(when))
|
||||||
|
if not world.dying:
|
||||||
log.info('Scheduling reconnect to %s at %s', self.server, whenS)
|
log.info('Scheduling reconnect to %s at %s', self.server, whenS)
|
||||||
schedule.addEvent(self.reconnect, when)
|
schedule.addEvent(self.reconnect, when)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user