branch: elpa/hyperdrive
commit 946074c27705806235d80d3887fedeceb6ebc813
Author: Adam Porter <[email protected]>
Commit: Joseph Turner <[email protected]>

    Change: (h/restart) Only stop gateway if it's running
---
 hyperdrive.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hyperdrive.el b/hyperdrive.el
index aff3112b9a..5632dd9632 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -1358,8 +1358,8 @@ gateway version."
   "Restart the gateway."
   (interactive)
   (h/message "Restarting gateway...")
-  ;; TODO: Just start the gateway if it's already stopped?
-  (h/stop)
+  (when (or (h/gateway-live-p) (h//gateway-ready-p))
+    (h/stop))
   (with-timeout (5 (h/message "Timed out waiting for gateway to stop"))
     (cl-loop while (h/gateway-live-p)
              do (sleep-for 0.2)))

Reply via email to