From: João Távora Date: Sun, 27 May 2018 18:45:52 +0000 (+0100) Subject: On reconnection, ignore errors of shutting down hung server X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~527 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1febf627146fdb294bd9e04ef9ce1782a1c1ad27;p=emacs.git On reconnection, ignore errors of shutting down hung server * eglot.el (eglot, eglot-reconnect): Ignore any errors on shutdown. --- diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 8ab4b496e2d..d75499348f8 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -397,7 +397,7 @@ INTERACTIVE is t if called interactively." (eglot-reconnect current-server interactive) (when (and current-server (process-live-p (eglot--process current-server))) - (eglot-shutdown current-server)) + (ignore-errors (eglot-shutdown current-server))) (let ((server (eglot--connect project managed-major-mode command @@ -413,7 +413,7 @@ managing `%s' buffers in project `%s'." INTERACTIVE is t if called interactively." (interactive (list (eglot--current-server-or-lose) t)) (when (process-live-p (eglot--process server)) - (eglot-shutdown server interactive)) + (ignore-errors (eglot-shutdown server interactive))) (eglot--connect (eglot--project server) (eglot--major-mode server) (eglot--contact server)