Changed format of reconnect scheduling log.

This commit is contained in:
Jeremy Fincher 2003-09-01 16:50:56 +00:00
parent 1cf1e022a2
commit a2d9e58c2a
2 changed files with 10 additions and 4 deletions

View File

@ -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):

View File

@ -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)