(self)
Close the connection to the HTTP server.
Close the connection to the HTTP server.
Close the connection to the HTTP server .
def close(self):
        """Close the connection to the HTTP server."""
        self.__state = _CS_IDLE
        try:
            sock = self.sock
            if sock:
                self.sock = None
                sock.close()   # close it manually... there may be other refs
        finally:
            response = self.__response
            if response:
                self.__response = None
                response.close()
def close ( self ) : self . __state = _CS_IDLE try : sock = self . sock if sock : self . sock = None sock . close ( ) # close it manually... there may be other refs finally : response = self . __response if response : self . __response = None response . close ( )