[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/10: offload: Adjust default 'max-silent-time' value of 'open-ssh-sess
From: |
guix-commits |
Subject: |
02/10: offload: Adjust default 'max-silent-time' value of 'open-ssh-session'. |
Date: |
Sat, 24 Oct 2020 19:07:40 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit c9278dc9c181500890b29a57b629760f6728d92a
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sun Oct 25 00:20:12 2020 +0200
offload: Adjust default 'max-silent-time' value of 'open-ssh-session'.
* guix/scripts/offload.scm (open-ssh-session): Have 'max-silent-time'
default to #f rather than -1, which is not a valid timeout value.
Adjust body accordingly.
---
guix/scripts/offload.scm | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/guix/scripts/offload.scm b/guix/scripts/offload.scm
index a5dcffd..6366556 100644
--- a/guix/scripts/offload.scm
+++ b/guix/scripts/offload.scm
@@ -197,8 +197,10 @@ can interpret meaningfully."
private key from '~a': ~a")
file str)))))
-(define* (open-ssh-session machine #:optional (max-silent-time -1))
- "Open an SSH session for MACHINE and return it. Throw an error on failure."
+(define* (open-ssh-session machine #:optional max-silent-time)
+ "Open an SSH session for MACHINE and return it. Throw an error on failure.
+When MAX-SILENT-TIME is true, it must be a positive integer denoting the
+number of seconds after which the connection times out."
(let ((private (private-key-from-file* (build-machine-private-key machine)))
(public (public-key-from-file
(string-append (build-machine-private-key machine)
@@ -235,9 +237,10 @@ private key from '~a': ~a")
(leave (G_ "SSH public key authentication failed for '~a': ~a~%")
(build-machine-name machine) (get-error session))))
- ;; From then on use MAX-SILENT-TIME as the absolute timeout when
- ;; reading from or write to a channel for this session.
- (session-set! session 'timeout max-silent-time)
+ (when max-silent-time
+ ;; From then on use MAX-SILENT-TIME as the absolute timeout when
+ ;; reading from or write to a channel for this session.
+ (session-set! session 'timeout max-silent-time))
session)
(x
- branch master updated (6a3b476 -> cedb079), guix-commits, 2020/10/24
- 01/10: offload: Export <build-machine> accessors., guix-commits, 2020/10/24
- 02/10: offload: Adjust default 'max-silent-time' value of 'open-ssh-session'.,
guix-commits <=
- 04/10: gnu: python-robotframework: Update to 3.2.2., guix-commits, 2020/10/24
- 05/10: gnu: python-robotframework-lint: Update to 1.1-0.b0619ac., guix-commits, 2020/10/24
- 07/10: gnu: python-imap-tools: Update to 0.29.0., guix-commits, 2020/10/24
- 03/10: gnu: python-invoke: Update to 1.4.1., guix-commits, 2020/10/24
- 06/10: gnu: Add python-imap-tools., guix-commits, 2020/10/24
- 08/10: services: guix: Make /etc/guix/acl really declarative by default., guix-commits, 2020/10/24
- 09/10: doc: Add "Getting Substitutes from Other Servers" section., guix-commits, 2020/10/24
- 10/10: news: Add entry for the declarative substitute ACL., guix-commits, 2020/10/24