summaryrefslogtreecommitdiff
path: root/guix/build/download.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-11-14 09:51:50 +0100
committerLudovic Courtès <ludo@gnu.org>2017-11-14 23:46:53 +0100
commit9f8605958ef86a0054a04297917ca32ed58d9d56 (patch)
tree74ad48c8a8a5d963c7b0279ba84c1c3b58ef74ee /guix/build/download.scm
parent5724a14e71f21ccfe865ed6fadae3f7683fc66e2 (diff)
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'.
Diffstat (limited to 'guix/build/download.scm')
-rw-r--r--guix/build/download.scm3
1 files changed, 2 insertions, 1 deletions
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 @@ out if the connection could not be established in less than TIMEOUT seconds."
(_ (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