(self)
return None
Sends the ``quit`` command and closes the telnet connection.
Sends the ``quit`` command and closes the telnet connection.
Sends the quit command and closes the telnet connection .
def close(self):
        """
        Sends the ``quit`` command and closes the telnet connection.
        """
        if self._telnet_conn is not None:
            try:
                # Sent it directly, to avoid a recursive call of this method.
                self._telnet_conn.write(b"quit\n\r")
            finally:
                self._telnet_conn.close()
                self._telnet_conn = None
                self._telnet_queue = None

                del self._event_queue[:]
                self._num_pending_queries = 0

                _logger.debug("Disconnected client.")
        return None
def close ( self ) : if self . _telnet_conn is not None : try : # Sent it directly, to avoid a recursive call of this method. self . _telnet_conn . write ( b"quit\n\r" ) finally : self . _telnet_conn . close ( ) self . _telnet_conn = None self . _telnet_queue = None del self . _event_queue [ : ] self . _num_pending_queries = 0 _logger . debug ( "Disconnected client." ) return None