Skip to content
Snippets Groups Projects
Commit d4c8cb8b authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

don't think connection to server failed when only first connection attempt...

don't think connection to server failed when only first connection attempt failed when creating a new account
parent e17cbf0d
No related branches found
No related tags found
No related merge requests found
......@@ -251,6 +251,7 @@ class Connection(ConnectionHandlers):
# END disconenctedReconnCB
def _connection_lost(self):
log.debug('_connection_lost')
self.disconnect(on_purpose = False)
self.dispatch('STATUS', 'offline')
self.dispatch('CONNECTION_LOST',
......@@ -516,6 +517,7 @@ class Connection(ConnectionHandlers):
(_('Connection to proxy failed'), reason))
def connect_to_next_type(self, retry=False):
log.debug('Connection to next type')
if len(self._connection_types):
self._current_type = self._connection_types.pop(0)
if self.last_connection:
......@@ -557,6 +559,7 @@ class Connection(ConnectionHandlers):
self.connect_to_next_host(retry)
def connect_to_next_host(self, retry = False):
log.debug('Connection to next host')
if len(self._hosts):
# No config option exist when creating a new account
if self.last_connection_type:
......@@ -1279,6 +1282,9 @@ class Connection(ConnectionHandlers):
def _on_new_account(self, con = None, con_type = None):
if not con_type:
if len(self._connection_types) or len(self._hosts):
# There are still other way to try to connect
return
self.dispatch('NEW_ACC_NOT_CONNECTED',
(_('Could not connect to "%s"') % self._hostname))
return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment