diff mbox series

[bug#45409,v5,07/14] substitute: Stop using call-with-cached-connection in fetch-narinfos.

Message ID 20210213134719.19625-7-mail@cbaines.net
State New
Headers show
Series [bug#45409,v5,01/14] substitute: Remove buffer handling from fetch. | expand


Context Check Description
cbaines/submitting builds success
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Christopher Baines Feb. 13, 2021, 1:47 p.m. UTC
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
 guix/scripts/substitute.scm | 22 ++++++++--------------
 1 file changed, 8 insertions(+), 14 deletions(-)
diff mbox series


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))
       ((file #f)