Function: dape--shutdown

dape--shutdown is a natively compiled function defined in dape.el.

Signature

(dape--shutdown CONN)

Documentation

Shutdown CONN and delete its jsonrpc buffers.

Source Code

;; Defined in /nix/store/1fiaif8pifqj2jh65rbg3fkhg3i56q42-emacs-packages-deps/share/emacs/site-lisp/elpa/dape-0.27.1/dape.el
(defun dape--shutdown (conn)
  "Shutdown CONN and delete its jsonrpc buffers."
  ;; Signal the process first so the sentinel fires on iter 0 in
  ;; `jsonrpc-shutdown'.  Preventing the misleading sentinel warning
  ;; (DAP has no client-initiated shutdown).
  (unwind-protect
      (let ((proc (jsonrpc--process conn)))
        ;; XXX Final call for timers to run while process exists.
        ;; May also swallow signals from non Dape owned
        ;; timer/sentinel/filter functions.
        (with-demoted-errors "%S" (accept-process-output nil 0.2))
        (delete-process proc)
        (jsonrpc-shutdown conn t))
    (unless dape-debug
      (kill-buffer (jsonrpc-events-buffer conn)))))