From 06ce4e3c06145423e66bb5694d800256e762057c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 9 Aug 2022 19:35:53 +0200 Subject: [PATCH] ssh: 'open-ssh-session' gracefully handles connection timeouts. * guix/ssh.scm (open-ssh-session): Add case for 'again. --- guix/ssh.scm | 4 ++++ 1 file changed, 4 insertions(+) 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 @@ (define* (open-ssh-session host #:key user port identity ('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