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

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

[nongnu] elpa/hyperdrive 33d93c97ec 032/163: Fix: (h//gateway-wait-for-r


From: ELPA Syncer
Subject: [nongnu] elpa/hyperdrive 33d93c97ec 032/163: Fix: (h//gateway-wait-for-ready) Time logic and conditional
Date: Fri, 31 May 2024 04:00:09 -0400 (EDT)

branch: elpa/hyperdrive
commit 33d93c97ec9024134a78e66f15e8b128b2eab5a9
Author: Joseph Turner <joseph@ushin.org>
Commit: Joseph Turner <joseph@ushin.org>

    Fix: (h//gateway-wait-for-ready) Time logic and conditional
---
 hyperdrive-lib.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 6b86b631b7..c131364fba 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -1504,16 +1504,16 @@ Times out after 2 seconds."
   "Run `hyperdrive-gateway-ready-hook' after gateway is ready.
 Or if gateway isn't ready within timeout, show an error."
   (letrec
-      ((start-time (float-time))
+      ((start-time (current-time))
        (check
         (lambda ()
-          (cond ((h//gateway-live-p)
+          (cond ((and (h//gateway-live-p) (h//gateway-ready-p))
                  (run-hooks 'h/gateway-ready-hook))
                 ((h//gateway-ready-p)
                  ;; Gateway is responsive, so must be running from outside 
Emacs.
                  (run-hooks 'h/gateway-ready-hook)
                  (h/message "Gateway is already running outside of Emacs"))
-                ((> 10 (time-subtract (float-time) start-time))
+                ((< 10 (float-time (time-subtract nil start-time)))
                  ;; Gateway still not responsive: show error.
                  (pop-to-buffer " *hyperdrive-start*")
                  (h/error "Gateway failed to start (see process buffer for 
errors)"))



reply via email to

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