core, plugin misc_account: set XMPP connection max retries to 0 when checking if an external account exists
This commit is contained in:
parent
ffee469c3e
commit
f3a5cb2a96
1 changed files with 11 additions and 8 deletions
|
|
@ -34,12 +34,12 @@ from twisted.words.protocols.jabber.xmlstream import XMPPHandler
|
|||
class SatXMPPClient(client.XMPPClient):
|
||||
implements(iwokkel.IDisco)
|
||||
|
||||
def __init__(self, host_app, profile, user_jid, password, host=None, port=C.XMPP_C2S_PORT):
|
||||
def __init__(self, host_app, profile, user_jid, password, host=None, port=C.XMPP_C2S_PORT, max_retries=C.XMPP_MAX_RETRIES):
|
||||
# XXX: DNS SRV records are checked when the host is not specified.
|
||||
# If no SRV record is found, the host is directly extracted from the JID.
|
||||
client.XMPPClient.__init__(self, user_jid, password, host or None, port or C.XMPP_C2S_PORT)
|
||||
self.factory.clientConnectionLost = self.connectionLost
|
||||
self.factory.maxRetries = 2
|
||||
self.factory.maxRetries = max_retries
|
||||
self.__connected = False
|
||||
self.profile = profile
|
||||
self.host_app = host_app
|
||||
|
|
|
|||
Loading…
Reference in a new issue