core (xmpp): don't purge entity on disconnect if continueTrying is set
This commit is contained in:
parent
4eeb1ef3e8
commit
b0dd28a346
1 changed files with 7 additions and 4 deletions
|
|
@ -374,15 +374,18 @@ class SatXMPPEntity(object):
|
|||
self.host_app.bridge.disconnected(
|
||||
self.profile
|
||||
) # we send the signal to the clients
|
||||
self._connected_d.callback(None)
|
||||
self.host_app.purgeEntity(
|
||||
self.profile
|
||||
) # and we remove references to this client
|
||||
log.info(
|
||||
_("********** [{profile}] DISCONNECTED **********").format(
|
||||
profile=self.profile
|
||||
)
|
||||
)
|
||||
# we purge only if no new connection attempt is expected
|
||||
if not self.factory.continueTrying:
|
||||
log.debug("continueTrying not set, purging entity")
|
||||
self._connected_d.callback(None)
|
||||
# and we remove references to this client
|
||||
self.host_app.purgeEntity(self.profile)
|
||||
|
||||
if not self.conn_deferred.called:
|
||||
if reason is None:
|
||||
err = error.StreamError("Server unexpectedly closed the connection")
|
||||
|
|
|
|||
Loading…
Reference in a new issue