]> git.eshelyaron.com Git - emacs.git/commitdiff
On reconnection, ignore errors of shutting down hung server
authorJoão Távora <joaotavora@gmail.com>
Sun, 27 May 2018 18:45:52 +0000 (19:45 +0100)
committerJoão Távora <joaotavora@gmail.com>
Sun, 27 May 2018 18:45:52 +0000 (19:45 +0100)
* eglot.el
(eglot, eglot-reconnect): Ignore any errors on shutdown.

lisp/progmodes/eglot.el

index 8ab4b496e2de9830347d65fb29c91b976238e87f..d75499348f88d92b8b7b4731ae188f2584df740a 100644 (file)
@@ -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)