branch: externals/eglot commit c648c4f07fad16b1aa4dbe850b9b5cd70fe8a0ce Author: João Távora <joaotav...@gmail.com> Commit: João Távora <joaotav...@gmail.com>
Robustness fixes for the request mechanism * eglot.el (eglot--async-request): Pass actual id to eglot--log-event (eglot--request): Also cancel any continuations. --- eglot.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/eglot.el b/eglot.el index a5c4696..13d0086 100644 --- a/eglot.el +++ b/eglot.el @@ -640,7 +640,7 @@ TIMER)." (funcall (or timeout-fn (lambda () (eglot--log-event - proc `(:timed-out ,method :id id + proc `(:timed-out ,method :id ,id :params ,params))))))))))) (when deferred (let* ((buf (current-buffer)) @@ -703,7 +703,9 @@ DEFERRED is passed to `eglot--async-request', which see." ,(format "Ooops: %s: %s" code message)))) :deferred deferred)) (while t (accept-process-output nil 30))) - (when (cadr id-and-timer) (cancel-timer (cadr id-and-timer)))))) + (pcase-let ((`(,id ,timer) id-and-timer)) + (when id (remhash id (eglot--pending-continuations proc))) + (when timer (cancel-timer timer)))))) (when (eq 'error (car res)) (eglot--error (cadr res))) (cadr res)))