Let's reset only once, m'kay?

This commit is contained in:
Jeremy Fincher 2004-07-29 10:31:10 +00:00
parent e714edef3c
commit 734b3c226b

View File

@ -134,7 +134,11 @@ class SocketDriver(drivers.IrcDriver):
def reconnect(self, wait=False, reset=True): def reconnect(self, wait=False, reset=True):
server = '%s:%s' % self.server server = '%s:%s' % self.server
if reset:
log.debug('Resetting %s.', self.irc)
self.irc.reset() self.irc.reset()
else:
log.debug('Not resetting %s.', self.irc)
if self.connected: if self.connected:
log.info('Reconnect called on driver for %s.', self.irc) log.info('Reconnect called on driver for %s.', self.irc)
self.conn.close() self.conn.close()
@ -145,11 +149,6 @@ class SocketDriver(drivers.IrcDriver):
log.info('Reconnect to %s waiting.', server) log.info('Reconnect to %s waiting.', server)
self._scheduleReconnect() self._scheduleReconnect()
return return
if reset:
log.debug('Resetting %s.', self.irc)
self.irc.reset()
else:
log.debug('Not resetting %s.', self.irc)
try: try:
self.conn = utils.getSocket(self.server[0]) self.conn = utils.getSocket(self.server[0])
except socket.error, e: except socket.error, e: