Mercurial > libervia-backend
comparison src/core/xmpp.py @ 1725:c1be6363bfab
core, plugin misc_account: set XMPP connection max retries to 0 when checking if an external account exists
author | souliane <souliane@mailoo.org> |
---|---|
date | Mon, 07 Dec 2015 19:56:12 +0100 |
parents | 4308bca92922 |
children | 4c48468ead4c |
comparison
equal
deleted
inserted
replaced
1724:13e43b2cd7a2 | 1725:c1be6363bfab |
---|---|
32 | 32 |
33 | 33 |
34 class SatXMPPClient(client.XMPPClient): | 34 class SatXMPPClient(client.XMPPClient): |
35 implements(iwokkel.IDisco) | 35 implements(iwokkel.IDisco) |
36 | 36 |
37 def __init__(self, host_app, profile, user_jid, password, host=None, port=C.XMPP_C2S_PORT): | 37 def __init__(self, host_app, profile, user_jid, password, host=None, port=C.XMPP_C2S_PORT, max_retries=C.XMPP_MAX_RETRIES): |
38 # XXX: DNS SRV records are checked when the host is not specified. | 38 # XXX: DNS SRV records are checked when the host is not specified. |
39 # If no SRV record is found, the host is directly extracted from the JID. | 39 # If no SRV record is found, the host is directly extracted from the JID. |
40 client.XMPPClient.__init__(self, user_jid, password, host or None, port or C.XMPP_C2S_PORT) | 40 client.XMPPClient.__init__(self, user_jid, password, host or None, port or C.XMPP_C2S_PORT) |
41 self.factory.clientConnectionLost = self.connectionLost | 41 self.factory.clientConnectionLost = self.connectionLost |
42 self.factory.maxRetries = 2 | 42 self.factory.maxRetries = max_retries |
43 self.__connected = False | 43 self.__connected = False |
44 self.profile = profile | 44 self.profile = profile |
45 self.host_app = host_app | 45 self.host_app = host_app |
46 self.conn_deferred = defer.Deferred() | 46 self.conn_deferred = defer.Deferred() |
47 self._waiting_conf = {} # callback called when a confirmation is received | 47 self._waiting_conf = {} # callback called when a confirmation is received |