Sends a QUIT message, closes the connection and -
            ends Lurklib's main loop.
        Optional arguments:
        * reason='' - Reason for quitting.
516755
def quit(self, reason=''):
        
        with self.lock:
            self.keep_going = False
            self._quit(reason)
            self._socket.shutdown(self._m_socket.SHUT_RDWR)
            self._socket.close()
1336920
def close(self):
        
        _vv and IOLOG.debug('%r.close()', self)
        self.context.send(
            Message.dead(
                reason=self.explicit_close_msg,
                handle=self.dst_handle
            )
        )
1090066
def exit(self):
        ''''''
        self.output.write("Happy hacking!")
        self.output.nextLine()
        self.output.loseConnection()
284677
public void terminate(String reason) throws XMPPException, NotConnectedException, InterruptedException {
        if (isClosed())
            return;
        LOGGER.fine("Terminate " + reason);
        Jingle jout = new Jingle(JingleActionEnum.SESSION_TERMINATE);
        jout.setType(IQ.Type.set);
        sendStanza(jout);
        triggerSessionClosed(reason);
    }
407104
async def close_async(self, context, reason):
        
        logger.info("Connection closed (reason {}, id {}, offset {}, sq_number {})".format(
            reason,
            context.partition_id,
            context.offset,
            context.sequence_number))
612419
def do_quit(self, _):
        ''''''
        if (self.server.is_server_running() == 'yes' or
                self.server.is_server_running() == 'maybe'):
            user_input = raw_input("Quitting shell will shut down experiment "
                                    "server. Really quit? y or n: ")
            if user_input == 'y':
                self.server_off()
            else:
                return False
        return True
1041964
def accel_quit(self, *args):
        
        procs = self.notebook_manager.get_running_fg_processes_count()
        tabs = self.notebook_manager.get_n_pages()
        notebooks = self.notebook_manager.get_n_notebooks()
        prompt_cfg = self.settings.general.get_boolean('prompt-on-quit')
        prompt_tab_cfg = self.settings.general.get_int('prompt-on-close-tab')
        # "Prompt on tab close" config overrides "prompt on quit" config
        if prompt_cfg or (prompt_tab_cfg == 1 and procs > 0) or (prompt_tab_cfg == 2):
            log.debug("Remaining procs=%r", procs)
            if PromptQuitDialog(self.window, procs, tabs, notebooks).quit():
                log.info("Quitting Guake")
                Gtk.main_quit()
        else:
            log.info("Quitting Guake")
            Gtk.main_quit()
77572
def close(self, status=1000, reason=u''):
        
        try:
            if self.closed is False:
                close_msg = bytearray()
                close_msg.extend(struct.pack("!H", status))
                if _check_unicode(reason):
                    close_msg.extend(reason.encode('utf-8'))
                else:
                    close_msg.extend(reason)

                self._send_message(False, CLOSE, close_msg)
        finally:
            self.closed = True
581677
def close(self):
        
        if self._socket is not None and self._conn is not None:
            message_input = UnityMessage()
            message_input.header.status = 400
            self._communicator_send(message_input.SerializeToString())
        if self._socket is not None:
            self._socket.close()
            self._socket = None
        if self._socket is not None:
            self._conn.close()
            self._conn = None
913305
def on_close(code, reason)
      connection.terminate
      terminate
      log_debug("#{@actor.class} dispatching on close  #{code} #{reason}")
      if @actor.respond_to?(:async)
        @actor.async.on_close(code, reason)
      else
        @actor.on_close(code, reason)
      end
    end
1293533
def on_close(self):
        ''' 

        '''
        log.info('WebSocket connection closed: code=%s, reason=%r', self.close_code, self.close_reason)
        if self.connection is not None:
            self.application.client_lost(self.connection)
1036402
def exit():
        
        exit_msg = None
        try:
            loop = asyncio.get_event_loop()
            loop.stop()
        except Exception as e:
            logging.error('Could not stop loop: %s\nShutting down anyway..',
                          str(e))
666833
def exit(self, message):
        

        self.output(message, normal=True, color="green")
        sys.exit()
291237
def do_quit(self, arg):
        
        if self.cmdprefix:
            raise CmdError("prefix not allowed")
        if arg:
            raise CmdError("too many arguments")
        if self.confirm_quit:
            count = self.debug.get_debugee_count()
            if count > 0:
                if count == 1:
                    msg = "There's a program still running."
                else:
                    msg = "There are %s programs still running." % count
                if not self.ask_user(msg):
                    return False
        self.debuggerExit = True
        return True
99972
def close(self, reason=None):
        
        with self._closing:
            if self._closed:
                return

            self._websocket.close()

            self._consumer.join()
            self._consumer = None

            self._websocket = None
            self._closed = True
            for cb in self._close_callbacks:
                cb(self, reason)
89222
def fail(reason=nil, options={})
      case reason
      when Errno::EACCES
        STDERR.puts reason.message
        STDERR.puts "Try elevating privilege (sudo/runas) before invoking this command."
        code = 2
      when Exception
        STDOUT.puts "Unexpected #{reason.class.name}: #{reason.message}"
        STDOUT.puts "We apologize for the inconvenience. You may try connecting as root"
        STDOUT.puts "to work around this problem, if you have sufficient privilege."
        unless @log_sink.string.empty?
          STDERR.puts
          STDERR.puts("Debugging information:")
          STDERR.puts(@log_sink.string)
        end
        code = 50
      when String
        STDOUT.puts reason
        code = 50
      when Integer
        code = reason
      else
        code = 50
      end

      puts Usage.scan(__FILE__) if options[:print_usage]
      exit(code)
    end
552059
function quit(m, l, ch) {
        throw {
            name: 'JSLintError',
            line: l,
            character: ch,
            message: m + " (" + Math.floor((l / lines.length) * 100) +
                    "% scanned)."
        };
    }