mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 20:52:42 +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)
|
self.reconnect(reset=False, **kwargs)
|
||||||
|
|
||||||
def reconnect(self, wait=False, reset=True):
|
def reconnect(self, wait=False, reset=True):
|
||||||
server = self._getNextServer()
|
|
||||||
if self.connected:
|
if self.connected:
|
||||||
drivers.log.reconnect(self.irc.network)
|
drivers.log.reconnect(self.irc.network)
|
||||||
self.conn.close()
|
self.conn.close()
|
||||||
elif not wait:
|
self.connected = False
|
||||||
drivers.log.connect(self.currentServer)
|
|
||||||
if reset:
|
if reset:
|
||||||
drivers.log.debug('Resetting %s.', self.irc)
|
drivers.log.debug('Resetting %s.', self.irc)
|
||||||
self.irc.reset()
|
self.irc.reset()
|
||||||
else:
|
else:
|
||||||
drivers.log.debug('Not resetting %s.', self.irc)
|
drivers.log.debug('Not resetting %s.', self.irc)
|
||||||
self.connected = False
|
|
||||||
if wait:
|
if wait:
|
||||||
self._scheduleReconnect()
|
self._scheduleReconnect()
|
||||||
return
|
return
|
||||||
|
server = self._getNextServer()
|
||||||
|
drivers.log.connect(self.currentServer)
|
||||||
try:
|
try:
|
||||||
self.conn = utils.getSocket(server[0])
|
self.conn = utils.getSocket(server[0])
|
||||||
except socket.error, e:
|
except socket.error, e:
|
||||||
|
Loading…
Reference in New Issue
Block a user