emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/eglot 9c52f24 36/54: Fix #277: Send exit as a notificat


From: João Távora
Subject: [elpa] externals/eglot 9c52f24 36/54: Fix #277: Send exit as a notification
Date: Thu, 16 Apr 2020 05:31:51 -0400 (EDT)

branch: externals/eglot
commit 9c52f24b4e6fccb60e96d3e68d079fa7b8e41f48
Author: Felicián Németh <address@hidden>
Commit: Felicián Németh <address@hidden>

    Fix #277: Send exit as a notification
    
    This is what the specification requires.  @PerMildner, thanks for
    reporting and analyzing the issue.
    
    * eglot.el (eglot-shutdown): Use `notify' instead of `request' for the
    `exit' LSP method.
---
 eglot.el | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/eglot.el b/eglot.el
index e952b91..888eacc 100644
--- a/eglot.el
+++ b/eglot.el
@@ -596,11 +596,8 @@ SERVER.  ."
       (progn
         (setf (eglot--shutdown-requested server) t)
         (jsonrpc-request server :shutdown nil :timeout (or timeout 1.5))
-        ;; this one is supposed to always fail, because it asks the
-        ;; server to exit itself. Hence ignore-errors.
-        (ignore-errors (jsonrpc-request server :exit nil :timeout 1)))
-    ;; Now ask jsonrpc.el to shut down the server (which under normal
-    ;; conditions should return immediately).
+        (jsonrpc-notify server :exit nil))
+    ;; Now ask jsonrpc.el to shut down the server.
     (jsonrpc-shutdown server (not preserve-buffers))
     (unless preserve-buffers (kill-buffer (jsonrpc-events-buffer server)))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]