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

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

[nongnu] externals/sly 3f72671 7/7: Close #378: new sly-connection-poll-


From: Stefan Monnier
Subject: [nongnu] externals/sly 3f72671 7/7: Close #378: new sly-connection-poll-interval user option
Date: Sat, 21 Nov 2020 01:34:53 -0500 (EST)

branch: externals/sly
commit 3f72671bea648a09f4375a1fd27b6de20210ec3f
Author: Pierre Neidhardt <mail@ambrevar.xyz>
Commit: GitHub <noreply@github.com>

    Close #378: new sly-connection-poll-interval user option
    
    * sly.el (sly-connection-poll-interval): New defcustom.
    (sly-attempt-connection): Use it instead of the hard-coded timer value.
---
 sly.el | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/sly.el b/sly.el
index ebe8cc1..5583c83 100644
--- a/sly.el
+++ b/sly.el
@@ -1395,6 +1395,11 @@ Fall back to `sly-init-using-slynk-loader' if ASDF 
fails."
 (defun sly-read-port-and-connect (inferior-process)
   (sly-attempt-connection inferior-process nil 1))
 
+(defcustom sly-connection-poll-interval 0.3
+  "Seconds to wait between connection attempts when first connecting."
+  :type 'number
+  :group 'sly-ui)
+
 (defun sly-attempt-connection (process retries attempt)
   ;; A small one-state machine to attempt a connection with
   ;; timer-based retries.
@@ -1424,7 +1429,7 @@ Fall back to `sly-init-using-slynk-loader' if ASDF fails."
            (cl-assert (not sly-connect-retry-timer))
            (setq sly-connect-retry-timer
                  (run-with-timer
-                  0.3 nil
+                  sly-connection-poll-interval nil
                   #'sly-timer-call #'sly-attempt-connection
                   `((sly-ignore-protocol-mismatches . 
,sly-ignore-protocol-mismatches))
                   process (and retries (1- retries))



reply via email to

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