diff --git a/sat/core/xmpp.py b/sat/core/xmpp.py index eddbe9d5..e32acaae 100644 --- a/sat/core/xmpp.py +++ b/sat/core/xmpp.py @@ -222,9 +222,6 @@ class SatXMPPEntity(object): ) # FIXME: we should have a timeout here, and a way to know if a plugin freeze # TODO: mesure launch time of each plugin - # we finally send our presence - entity.presence.available() - def _disconnectionCb(self, __): self._connected_d = None @@ -748,6 +745,14 @@ class SatXMPPClient(SatXMPPEntity, wokkel_client.XMPPClient): self.presence = SatPresenceProtocol(self.host_app) self.presence.setHandlerParent(self) + @classmethod + @defer.inlineCallbacks + def startConnection(cls, host, profile, max_retries): + yield super(SatXMPPClient, cls).startConnection(host, profile, max_retries) + entity = host.profiles[profile] + # we finally send our presence + entity.presence.available() + def entityConnected(self): # we want to be sure that we got the roster return self.roster.got_roster