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

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

[elpa] externals/eglot 7769c07 16/69: Send message, then establish conti


From: João Távora
Subject: [elpa] externals/eglot 7769c07 16/69: Send message, then establish continuations
Date: Fri, 22 Jun 2018 11:54:56 -0400 (EDT)

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

    Send message, then establish continuations
    
    This way, if serializing fails, or something else, we won't be
    bothered by the failing timeout.
    
    * jrpc.el (jrpc-async-request): Send, then establish continuations.
---
 jrpc.el | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/jrpc.el b/jrpc.el
index 7303414..bb4fe28 100644
--- a/jrpc.el
+++ b/jrpc.el
@@ -558,8 +558,12 @@ Return the request ID, or nil, in case the request was 
deferred."
             (puthash (list deferred buf) (list later (funcall make-timeout))
                      (jrpc--deferred-actions proc))
             (cl-return-from jrpc-async-request nil)))))
-    ;; Really run it
+    ;; Really send it
     ;;
+    (jrpc--process-send proc (jrpc-obj :jsonrpc "2.0"
+                                       :id id
+                                       :method method
+                                       :params params))
     (puthash id
              (list (or success-fn
                        (jrpc-lambda (&rest _ignored)
@@ -573,10 +577,6 @@ Return the request ID, or nil, in case the request was 
deferred."
                                          :id id :error code))))
                    (funcall make-timeout))
              (jrpc--request-continuations proc))
-    (jrpc--process-send proc (jrpc-obj :jsonrpc "2.0"
-                                       :id id
-                                       :method method
-                                       :params params))
     id))
 
 (cl-defun jrpc-request (proc method params &key deferred)



reply via email to

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