Sends a QUIT message, closes the connection and -
            ends Lurklib's main loop.
        Optional arguments:
        * reason='' - Reason for quitting.

def quit(self, reason=''):
        """
        Sends a QUIT message, closes the connection and -
            ends Lurklib's main loop.
        Optional arguments:
        * reason='' - Reason for quitting.
        """
        with self.lock:
            self.keep_going = False
            self._quit(reason)
            self._socket.shutdown(self._m_socket.SHUT_RDWR)
            self._socket.close()