mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-27 21:22:39 +01:00
Let's reset only once, m'kay?
This commit is contained in:
parent
e714edef3c
commit
734b3c226b
@ -134,7 +134,11 @@ class SocketDriver(drivers.IrcDriver):
|
||||
|
||||
def reconnect(self, wait=False, reset=True):
|
||||
server = '%s:%s' % self.server
|
||||
self.irc.reset()
|
||||
if reset:
|
||||
log.debug('Resetting %s.', self.irc)
|
||||
self.irc.reset()
|
||||
else:
|
||||
log.debug('Not resetting %s.', self.irc)
|
||||
if self.connected:
|
||||
log.info('Reconnect called on driver for %s.', self.irc)
|
||||
self.conn.close()
|
||||
@ -145,11 +149,6 @@ class SocketDriver(drivers.IrcDriver):
|
||||
log.info('Reconnect to %s waiting.', server)
|
||||
self._scheduleReconnect()
|
||||
return
|
||||
if reset:
|
||||
log.debug('Resetting %s.', self.irc)
|
||||
self.irc.reset()
|
||||
else:
|
||||
log.debug('Not resetting %s.', self.irc)
|
||||
try:
|
||||
self.conn = utils.getSocket(self.server[0])
|
||||
except socket.error, e:
|
||||
|
Loading…
Reference in New Issue
Block a user