don't try to connect, when we are in state

'connecting'
This commit is contained in:
Dimitur Kirov 2006-03-15 21:06:22 +00:00
parent cf96c327e1
commit d33055c3bc
1 changed files with 4 additions and 0 deletions

View File

@ -1821,6 +1821,7 @@ class Connection:
if self.last_connection:
self.last_connection.socket.disconnect()
self.last_connection = None
self.connection = None
if gajim.verbose:
con = common.xmpp.NonBlockingClient(self._hostname, caller = self,
on_connect = self.on_connect_success,
@ -2116,6 +2117,9 @@ class Connection:
self._on_disconnected()
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')
self.connected = STATUS_LIST.index(show)
if show == 'invisible':