Skip to content

Commit

Permalink
Merge pull request #400 from joaotavora/scratch/fix-277-exit-notifica…
Browse files Browse the repository at this point in the history
…tion

Fix #277: Send exit as a notification
  • Loading branch information
nemethf authored Jan 5, 2020
2 parents 4b453dc + 9c52f24 commit a4c83a6
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions eglot.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)))))

Expand Down

0 comments on commit a4c83a6

Please sign in to comment.