summary refs log tree commit diff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-08-09 19:35:53 +0200
committerLudovic Courtès <ludo@gnu.org>2022-08-10 16:53:58 +0200
commit06ce4e3c06145423e66bb5694d800256e762057c (patch)
tree30f62f7b0b3c3726fbad33c6b32b2ee991c68592
parent26bdefd172ec04c4f74cfa19585480904b60a9dd (diff)
downloadguix-06ce4e3c06145423e66bb5694d800256e762057c.tar.gz
ssh: 'open-ssh-session' gracefully handles connection timeouts.
* guix/ssh.scm (open-ssh-session): Add case for 'again.
-rw-r--r--guix/ssh.scm4
1 files changed, 4 insertions, 0 deletions
diff --git a/guix/ssh.scm b/guix/ssh.scm
index a6f0f2eb96..1b825a2573 100644
--- a/guix/ssh.scm
+++ b/guix/ssh.scm
@@ -162,6 +162,10 @@ server at '~a': ~a")
          ('success
           (session-set! session 'timeout timeout)
           session)
+         ('again
+          (raise (formatted-message (G_ "timeout while connecting \
+to SSH server at '~a'")
+                                    (session-get session 'host))))
          (x
           (match (userauth-gssapi! session)
             ('success