From 1febf627146fdb294bd9e04ef9ce1782a1c1ad27 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Sun, 27 May 2018 19:45:52 +0100 Subject: [PATCH] On reconnection, ignore errors of shutting down hung server * eglot.el (eglot, eglot-reconnect): Ignore any errors on shutdown. --- lisp/progmodes/eglot.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) -- 2.39.2