don't try to connect, when we are in state
'connecting'
This commit is contained in:
parent
cf96c327e1
commit
d33055c3bc
1 changed files with 4 additions and 0 deletions
|
@ -1821,6 +1821,7 @@ class Connection:
|
||||||
if self.last_connection:
|
if self.last_connection:
|
||||||
self.last_connection.socket.disconnect()
|
self.last_connection.socket.disconnect()
|
||||||
self.last_connection = None
|
self.last_connection = None
|
||||||
|
self.connection = None
|
||||||
if gajim.verbose:
|
if gajim.verbose:
|
||||||
con = common.xmpp.NonBlockingClient(self._hostname, caller = self,
|
con = common.xmpp.NonBlockingClient(self._hostname, caller = self,
|
||||||
on_connect = self.on_connect_success,
|
on_connect = self.on_connect_success,
|
||||||
|
@ -2116,6 +2117,9 @@ class Connection:
|
||||||
self._on_disconnected()
|
self._on_disconnected()
|
||||||
|
|
||||||
elif show != 'offline' and self.connected:
|
elif show != 'offline' and self.connected:
|
||||||
|
# dont'try to connect, when we are in state 'connecting'
|
||||||
|
if self.connected == 1:
|
||||||
|
return
|
||||||
was_invisible = self.connected == STATUS_LIST.index('invisible')
|
was_invisible = self.connected == STATUS_LIST.index('invisible')
|
||||||
self.connected = STATUS_LIST.index(show)
|
self.connected = STATUS_LIST.index(show)
|
||||||
if show == 'invisible':
|
if show == 'invisible':
|
||||||
|
|
Loading…
Add table
Reference in a new issue