mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-28 13:42:36 +01:00
Changed format of reconnect scheduling log.
This commit is contained in:
parent
1cf1e022a2
commit
a2d9e58c2a
@ -70,14 +70,14 @@ class AsyncoreDriver(asynchat.async_chat, object):
|
||||
self.connect(self.server)
|
||||
except:
|
||||
debug.recoverableException('terse')
|
||||
self.scheduleReconnect()
|
||||
self.close()
|
||||
|
||||
def scheduleReconnect(self):
|
||||
#debug.methodNamePrintf(self, 'scheduleReconnect')
|
||||
when = time.time() + 60
|
||||
whenS = time.strftime(conf.logTimestampFormat, time.localtime(when))
|
||||
debug.msg('Scheduling reconnect at %s' % whenS, 'normal')
|
||||
debug.msg('Scheduling reconnect to %s at %s' % (self.server, whenS),
|
||||
'normal')
|
||||
def makeNewDriver():
|
||||
self.irc.reset()
|
||||
driver = self.__class__(self.server, self.irc)
|
||||
@ -110,6 +110,7 @@ class AsyncoreDriver(asynchat.async_chat, object):
|
||||
try:
|
||||
self.irc.feedMsg(msg)
|
||||
except:
|
||||
debug.msg('Exception caught outside Irc object.', 'normal')
|
||||
debug.recoverableException()
|
||||
|
||||
def handle_close(self):
|
||||
|
@ -87,7 +87,11 @@ class SocketDriver(drivers.IrcDriver):
|
||||
msg = ircmsgs.IrcMsg(line)
|
||||
debug.msg('Time to parse IrcMsg: %s' % (time.time()-start),
|
||||
'verbose')
|
||||
self.irc.feedMsg(msg)
|
||||
try:
|
||||
self.irc.feedMsg(msg)
|
||||
except:
|
||||
debug.msg('Exception caught outside Irc object.', 'normal')
|
||||
debug.recoverableException()
|
||||
except socket.timeout:
|
||||
pass
|
||||
self._sendIfMsgs()
|
||||
@ -110,7 +114,8 @@ class SocketDriver(drivers.IrcDriver):
|
||||
self.connected = False
|
||||
when = time.time() + 60
|
||||
whenS = time.strftime(conf.logTimestampFormat, time.localtime(when))
|
||||
debug.msg('Scheduling reconnect at %s' % whenS, 'normal')
|
||||
debug.msg('Scheduling reconnect to %s at %s' % (self.server, whenS),
|
||||
'normal')
|
||||
schedule.addEvent(self.reconnect, when)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user