mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-14 14:49:21 +01:00
Fixed problem with multiple servers.
This commit is contained in:
parent
de1673e606
commit
43b83013e8
@ -118,21 +118,20 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin):
|
||||
self.reconnect(reset=False, **kwargs)
|
||||
|
||||
def reconnect(self, wait=False, reset=True):
|
||||
server = self._getNextServer()
|
||||
if self.connected:
|
||||
drivers.log.reconnect(self.irc.network)
|
||||
self.conn.close()
|
||||
elif not wait:
|
||||
drivers.log.connect(self.currentServer)
|
||||
self.connected = False
|
||||
if reset:
|
||||
drivers.log.debug('Resetting %s.', self.irc)
|
||||
self.irc.reset()
|
||||
else:
|
||||
drivers.log.debug('Not resetting %s.', self.irc)
|
||||
self.connected = False
|
||||
if wait:
|
||||
self._scheduleReconnect()
|
||||
return
|
||||
server = self._getNextServer()
|
||||
drivers.log.connect(self.currentServer)
|
||||
try:
|
||||
self.conn = utils.getSocket(server[0])
|
||||
except socket.error, e:
|
||||
|
Loading…
Reference in New Issue
Block a user