[PyOpenSSL branch]
- Close connection after creating account. Fixes #2676 - Handle normal connection close by server. Fixes #2671 - Do not disconnect if we haven't received starttag yet. Fixes #2668. Fixes unticketed bug causing account creation not to work with PyOpenSSL and asynchronous handshake (see also #2671). Behaviour of #2634 is also improved but now results in deadlock.
This commit is contained in:
parent
8d1eaf0e4e
commit
c3e24dfa76
|
@ -184,7 +184,6 @@ class Connection(ConnectionHandlers):
|
|||
if not common.xmpp.isResultNode(result):
|
||||
self.dispatch('ACC_NOT_OK', (result.getError()))
|
||||
return
|
||||
self.connected = 0
|
||||
self.password = self.new_account_info['password']
|
||||
if USE_GPG:
|
||||
self.gpg = GnuPG.GnuPG()
|
||||
|
@ -194,7 +193,9 @@ class Connection(ConnectionHandlers):
|
|||
gajim.connections[self.name] = self
|
||||
self.dispatch('ACC_OK', (self.new_account_info))
|
||||
self.new_account_info = None
|
||||
self.connection = None
|
||||
if self.connection:
|
||||
self.connection.UnregisterDisconnectHandler(self._on_new_account)
|
||||
self.disconnect(on_purpose=True)
|
||||
common.xmpp.features_nb.register(self.connection, data[0],
|
||||
req, _on_register_result)
|
||||
return
|
||||
|
@ -867,6 +868,8 @@ class Connection(ConnectionHandlers):
|
|||
return
|
||||
self.on_connect_failure = None
|
||||
self.connection = con
|
||||
if con:
|
||||
con.RegisterDisconnectHandler(self._on_new_account)
|
||||
common.xmpp.features_nb.getRegInfo(con, self._hostname)
|
||||
|
||||
def account_changed(self, new_name):
|
||||
|
|
Loading…
Reference in New Issue