]> git.eshelyaron.com Git - emacs.git/commitdiff
Call shutdown/exit methods with params:{}, not null
authorVladimir Panteleev <git@thecybershadow.net>
Sun, 6 Oct 2019 16:10:32 +0000 (16:10 +0000)
committerFelicián Németh <felician.nemeth@gmail.com>
Mon, 13 Jan 2020 15:54:13 +0000 (16:54 +0100)
"null" is not a valid JSON value for "params" according to the
JSON-RPC specification.

* eglot.el (eglot-shutdown): Do the same thing as for "initialized",
and use an empty hash table to be serialized to {}.

Copyright-paperwork-exempt: yes
GitHub-reference: per https://github.com/joaotavora/eglot/issues/315

lisp/progmodes/eglot.el

index 1decb2695fca9418b86a5f718794ceb5cb210428..1bdca12642dd77170e2488f6b687984fd9feb5da 100644 (file)
@@ -595,8 +595,9 @@ SERVER.  ."
   (unwind-protect
       (progn
         (setf (eglot--shutdown-requested server) t)
-        (jsonrpc-request server :shutdown nil :timeout (or timeout 1.5))
-        (jsonrpc-notify server :exit nil))
+        (jsonrpc-request server :shutdown (make-hash-table)
+                         :timeout (or timeout 1.5))
+        (jsonrpc-notify server :exit (make-hash-table)))
     ;; Now ask jsonrpc.el to shut down the server.
     (jsonrpc-shutdown server (not preserve-buffers))
     (unless preserve-buffers (kill-buffer (jsonrpc-events-buffer server)))))