diff options
author | Ludovic Courtès <ludo@gnu.org> | 2017-11-14 09:51:50 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2017-11-14 23:46:53 +0100 |
commit | 9f8605958ef86a0054a04297917ca32ed58d9d56 (patch) | |
tree | 74ad48c8a8a5d963c7b0279ba84c1c3b58ef74ee /guix/build | |
parent | 5724a14e71f21ccfe865ed6fadae3f7683fc66e2 (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')
-rw-r--r-- | guix/build/download.scm | 3 |
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 |