Skip to content
Snippets Groups Projects
Unverified Commit 08acee2f authored by Christopher Baines's avatar Christopher Baines
Browse files

substitute: Remove connection handling from fetch.

http-fetch does this, so just use that code instead.

* guix/scripts/substitute.scm (fetch): Remove connection handling when the
port is closed.
parent fbd61b5d
No related branches found
No related tags found
No related merge requests found
......@@ -200,14 +200,10 @@ (define* (fetch uri #:key (buffered? #t) (timeout? #t)
(warning (G_ "while fetching ~a: server is somewhat slow~%")
(uri->string uri))
(warning (G_ "try `--no-substitutes' if the problem persists~%")))
(begin
(when (or (not port) (port-closed? port))
(set! port (guix:open-connection-for-uri
uri #:verify-certificate? #f)))
(http-fetch uri #:text? #f #:port port
#:keep-alive? keep-alive?
#:buffered? buffered?
#:verify-certificate? #f))))))
(http-fetch uri #:text? #f #:port port
#:keep-alive? keep-alive?
#:buffered? buffered?
#:verify-certificate? #f)))))
(else
(leave (G_ "unsupported substitute URI scheme: ~a~%")
(uri->string uri)))))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment