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

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

[elpa] externals/eglot c648c4f 08/15: Robustness fixes for the request m


From: João Távora
Subject: [elpa] externals/eglot c648c4f 08/15: Robustness fixes for the request mechanism
Date: Sun, 20 May 2018 19:59:03 -0400 (EDT)

branch: externals/eglot
commit c648c4f07fad16b1aa4dbe850b9b5cd70fe8a0ce
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>

    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)))
 



reply via email to

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