Commit 686bea9bf046bc2ffb31fd7f10971e25ef8c502c

Thomas de Grivel 2018-07-03T11:21:59

keep trying to connect to host

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/core/host.lisp b/core/host.lisp
index f22bdd5..4457254 100644
--- a/core/host.lisp
+++ b/core/host.lisp
@@ -91,8 +91,10 @@
 
 (defmethod host-run ((host host) &rest command)
   (let ((shell (host-shell host)))
-    (when (shell-closed-p shell)
-      (setq shell (host-connect host)))
+    (loop
+       (if (shell-closed-p shell)
+           (setq shell (host-connect host))
+           (return)))
     (apply #'shell-run shell command)))
 
 (defmacro with-connected-host ((var hostname) &body body)