Skip to content

Commit

Permalink
Per #315: call shutdown/exit methods with params:{}, not null
Browse files Browse the repository at this point in the history
"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
  • Loading branch information
CyberShadow authored and nemethf committed Jan 13, 2020
1 parent 9f10a27 commit 212a7f7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions eglot.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)))))
Expand Down

0 comments on commit 212a7f7

Please sign in to comment.