def ensure_connected(self):
if self.socket:<EOL><INDENT>return True<EOL><DEDENT>host, port = self.url_info<EOL>session = tls.TLSSession()<EOL>self.socket = tls.TLSSocket(host, port, timeout=self.timeout, session=session)<EOL>return False<EOL>
Make sure a valid tls.TLSSocket() is open to the server

:return:
    A boolean indicating if the connection was reused