1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-14 15:30:29 -08:00

Ignore errors when shutting down all LSP servers (bug#59146)

eglot-shutdown-all has a bug that results in partially stopping
servers: when a server shutdown timeouts (1.5s), an error is
propagated and eglot-shutdown-all does not try to shutdown the rest of
the servers.

* eglot.el (eglot-shutdown-all): Ignore errors when shutting down
  servers, converting errors to messages.
This commit is contained in:
Evgeni Kolev 2022-11-10 17:17:44 +00:00 committed by João Távora
parent dc4aef3b85
commit c833b291f5

View file

@ -877,7 +877,8 @@ SERVER."
PRESERVE-BUFFERS as in `eglot-shutdown', which see."
(interactive (list current-prefix-arg))
(cl-loop for ss being the hash-values of eglot--servers-by-project
do (cl-loop for s in ss do (eglot-shutdown s nil nil preserve-buffers))))
do (with-demoted-errors "[eglot] shutdown all: %s"
(cl-loop for s in ss do (eglot-shutdown s nil nil preserve-buffers)))))
(defun eglot--on-shutdown (server)
"Called by jsonrpc.el when SERVER is already dead."