diff options
Diffstat (limited to 'sleekxmpp/xmlstream')
-rw-r--r-- | sleekxmpp/xmlstream/xmlstream.py | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py index 7098e1c1..5c24de5b 100644 --- a/sleekxmpp/xmlstream/xmlstream.py +++ b/sleekxmpp/xmlstream/xmlstream.py @@ -69,10 +69,8 @@ class XMLStream(object): self.__stanza_extension = {} self.__handlers = [] - self.__tls_socket = None self.filesocket = None self.use_ssl = False - self.use_tls = False self.ca_certs=None self.keep_alive = DEFAULT_KEEPALIVE @@ -103,11 +101,11 @@ class XMLStream(object): def setFileSocket(self, filesocket): self.filesocket = filesocket - def connect(self, host='', port=0, use_ssl=None, use_tls=None): + def connect(self, host='', port=0, use_ssl=None): "Establish a socket connection to the given XMPP server." if not self.state.transition('disconnected','connected', - func=self.connectTCP, args=[host, port, use_ssl, use_tls] ): + func=self.connectTCP, args=[host, port, use_ssl] ): if self.state['connected']: logging.debug('Already connected') else: logging.warning("Connection failed" ) @@ -119,7 +117,7 @@ class XMLStream(object): # TODO currently a caller can't distinguish between "connection failed" and # "we're already trying to connect from another thread" - def connectTCP(self, host='', port=0, use_ssl=None, use_tls=None, reattempt=True): + def connectTCP(self, host='', port=0, use_ssl=None, reattempt=True): "Connect and create socket" # Note that this is thread-safe by merit of being called solely from connect() which @@ -133,14 +131,11 @@ class XMLStream(object): self.address = (host, int(port)) if use_ssl is not None: self.use_ssl = use_ssl - if use_tls is not None: - # TODO this variable doesn't seem to be used for anything! - self.use_tls = use_tls if sys.version_info < (3, 0): self.socket = filesocket.Socket26(socket.AF_INET, socket.SOCK_STREAM) else: self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - self.socket.settimeout(None) #10) + self.socket.settimeout(None) if self.use_ssl and self.ssl_support: logging.debug("Socket Wrapped for SSL") |