From 9f8605958ef86a0054a04297917ca32ed58d9d56 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 14 Nov 2017 09:51:50 +0100 Subject: download: Pass the timeout to 'ftp-retr'. This ensures the timeout applies when connecting to the port returned by PASV. * guix/ftp-client.scm (ftp-list): Add #:timeout parameter. Use 'connect*' instead of 'connect' and pass TIMEOUT. (ftp-retr): Likewise. * guix/build/download.scm (ftp-fetch): Pass TIMEOUT to 'ftp-retr'. --- guix/build/download.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'guix/build') diff --git a/guix/build/download.scm b/guix/build/download.scm index a65c7b9964..90de269f9b 100644 --- a/guix/build/download.scm +++ b/guix/build/download.scm @@ -130,7 +130,8 @@ (define* (ftp-fetch uri file #:key timeout) (_ (ftp-open (uri-host uri) #:timeout timeout)))) (size (false-if-exception (ftp-size conn (uri-path uri)))) (in (ftp-retr conn (basename (uri-path uri)) - (dirname (uri-path uri))))) + (dirname (uri-path uri)) + #:timeout timeout))) (call-with-output-file file (lambda (out) (dump-port* in out -- cgit v1.2.3