def close(self):
try:<EOL><INDENT>self.shutdown()<EOL><DEDENT>finally:<EOL><INDENT>if self._socket:<EOL><INDENT>try:<EOL><INDENT>self._socket.close()<EOL><DEDENT>except (socket_.error):<EOL><INDENT>pass<EOL><DEDENT>self._socket = None<EOL><DEDENT><DEDENT>
Shuts down the TLS session and socket and forcibly closes it