From ebc35332756a7c9540e67ddc348c81f97b5d708c Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Wed, 23 Jul 2003 02:16:06 +0000 Subject: [PATCH] This file was hanging back on protocol since it's been less used. --- src/asyncoreDrivers.py | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/asyncoreDrivers.py b/src/asyncoreDrivers.py index 5d5876f51..8e42471e4 100644 --- a/src/asyncoreDrivers.py +++ b/src/asyncoreDrivers.py @@ -58,11 +58,10 @@ class AsyncoreRunnerDriver(drivers.IrcDriver): class AsyncoreDriver(asynchat.async_chat, object): - def __init__(self, (server, port), irc, reconnect=True): + def __init__(self, (server, port), irc): #debug.methodNamePrintf(self, '__init__') asynchat.async_chat.__init__(self) self.server = (server, port) - self.reconnect = reconnect self.irc = irc self.irc.driver = self self.buffer = '' @@ -76,15 +75,14 @@ class AsyncoreDriver(asynchat.async_chat, object): self.close() def scheduleReconnect(self): - if self.reconnect: - when = time.time() + 60 - whenS = time.strftime(conf.timestampFormat, time.localtime(when)) - debug.msg('Scheduling reconnect at %s' % whenS, 'normal') - def makeNewDriver(): - self.irc.reset() - driver = self.__class__(self.server, self.irc, self.reconnect) - driver.irc.driver = driver - schedule.addEvent(makeNewDriver, when) + when = time.time() + 60 + whenS = time.strftime(conf.timestampFormat, time.localtime(when)) + debug.msg('Scheduling reconnect at %s' % whenS, 'normal') + def makeNewDriver(): + self.irc.reset() + driver = self.__class__(self.server, self.irc) + driver.irc.driver = driver + schedule.addEvent(makeNewDriver, when) def writable(self): #debug.methodNamePrintf(self, 'writable')