mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 13:19:24 +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)
|
self.connect(self.server)
|
||||||
except:
|
except:
|
||||||
debug.recoverableException('terse')
|
debug.recoverableException('terse')
|
||||||
self.scheduleReconnect()
|
|
||||||
self.close()
|
self.close()
|
||||||
|
|
||||||
def scheduleReconnect(self):
|
def scheduleReconnect(self):
|
||||||
#debug.methodNamePrintf(self, 'scheduleReconnect')
|
#debug.methodNamePrintf(self, 'scheduleReconnect')
|
||||||
when = time.time() + 60
|
when = time.time() + 60
|
||||||
whenS = time.strftime(conf.logTimestampFormat, time.localtime(when))
|
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():
|
def makeNewDriver():
|
||||||
self.irc.reset()
|
self.irc.reset()
|
||||||
driver = self.__class__(self.server, self.irc)
|
driver = self.__class__(self.server, self.irc)
|
||||||
@ -110,6 +110,7 @@ class AsyncoreDriver(asynchat.async_chat, object):
|
|||||||
try:
|
try:
|
||||||
self.irc.feedMsg(msg)
|
self.irc.feedMsg(msg)
|
||||||
except:
|
except:
|
||||||
|
debug.msg('Exception caught outside Irc object.', 'normal')
|
||||||
debug.recoverableException()
|
debug.recoverableException()
|
||||||
|
|
||||||
def handle_close(self):
|
def handle_close(self):
|
||||||
|
@ -87,7 +87,11 @@ class SocketDriver(drivers.IrcDriver):
|
|||||||
msg = ircmsgs.IrcMsg(line)
|
msg = ircmsgs.IrcMsg(line)
|
||||||
debug.msg('Time to parse IrcMsg: %s' % (time.time()-start),
|
debug.msg('Time to parse IrcMsg: %s' % (time.time()-start),
|
||||||
'verbose')
|
'verbose')
|
||||||
self.irc.feedMsg(msg)
|
try:
|
||||||
|
self.irc.feedMsg(msg)
|
||||||
|
except:
|
||||||
|
debug.msg('Exception caught outside Irc object.', 'normal')
|
||||||
|
debug.recoverableException()
|
||||||
except socket.timeout:
|
except socket.timeout:
|
||||||
pass
|
pass
|
||||||
self._sendIfMsgs()
|
self._sendIfMsgs()
|
||||||
@ -110,7 +114,8 @@ class SocketDriver(drivers.IrcDriver):
|
|||||||
self.connected = False
|
self.connected = False
|
||||||
when = time.time() + 60
|
when = time.time() + 60
|
||||||
whenS = time.strftime(conf.logTimestampFormat, time.localtime(when))
|
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)
|
schedule.addEvent(self.reconnect, when)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user