aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2021-01-07 19:44:56 +0000
committerChristopher Baines <mail@cbaines.net>2021-02-22 20:43:10 +0000
commit7b812f7c84c43455cdd68a0e51b6ded018afcc8e (patch)
tree0a7afc014c4e6d1763bb40dc0b426925d2b59df0
parentf50b501a7472f4f237023831aa415a948115d1d1 (diff)
downloadguix-7b812f7c84c43455cdd68a0e51b6ded018afcc8e.tar.gz
guix-7b812f7c84c43455cdd68a0e51b6ded018afcc8e.zip
substitute: Stop using call-with-cached-connection in fetch-narinfos.
Instead, just pass open-connection-for-uri/maybe to http-multiple-get. This code should be functionaly similar to the previous code. The eventual aim of this is to make the connection caching not mandatory in fetch-narinfos. * guix/scripts/substitute.scm (fetch-narinfos): Remove use of call-with-cached-connection.
-rwxr-xr-xguix/scripts/substitute.scm22
1 files changed, 8 insertions, 14 deletions
diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm
index f01c11b020..cd52ad747e 100755
--- a/guix/scripts/substitute.scm
+++ b/guix/scripts/substitute.scm
@@ -412,20 +412,14 @@ port to it, or, if connection failed, print a warning and return #f. Pass
;; on the X.509 PKI. We can do it because we authenticate
;; narinfos, which provides a much stronger guarantee.
(let* ((requests (map (cut narinfo-request url <>) paths))
- (result (call-with-cached-connection uri
- (lambda (port)
- (if port
- (begin
- (update-progress!)
- (http-multiple-get uri
- handle-narinfo-response '()
- requests
- #:open-connection
- open-connection-for-uri/cached
- #:verify-certificate? #f
- #:port port))
- '()))
- open-connection-for-uri/maybe)))
+ (result (begin
+ (update-progress!)
+ (http-multiple-get uri
+ handle-narinfo-response '()
+ requests
+ #:open-connection
+ open-connection-for-uri/maybe
+ #:verify-certificate? #f))))
(newline (current-error-port))
result))
((file #f)