Mercurial > libervia-backend
comparison src/core/xmpp.py @ 1722:4308bca92922
core (client): fixed maximum connection tries to 3
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 07 Dec 2015 13:10:44 +0100 |
parents | 772c8edd1057 |
children | c1be6363bfab |
comparison
equal
deleted
inserted
replaced
1721:f6533aa7da7a | 1722:4308bca92922 |
---|---|
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): |
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.__connected = False | 43 self.__connected = False |
43 self.profile = profile | 44 self.profile = profile |
44 self.host_app = host_app | 45 self.host_app = host_app |
45 self.conn_deferred = defer.Deferred() | 46 self.conn_deferred = defer.Deferred() |
46 self._waiting_conf = {} # callback called when a confirmation is received | 47 self._waiting_conf = {} # callback called when a confirmation is received |