From 27e6906e188da98ce06e755c079e852bc01c770d Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Mon, 11 Sep 2023 12:34:50 +0100 Subject: Make sure to use streaming http requests everywhere As this avoids blocking. --- scripts/nar-herder.in | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/nar-herder.in b/scripts/nar-herder.in index 18fe6d5..247eeef 100644 --- a/scripts/nar-herder.in +++ b/scripts/nar-herder.in @@ -36,6 +36,7 @@ (srfi srfi-19) (srfi srfi-37) (srfi srfi-43) + (srfi srfi-71) (ice-9 ftw) (ice-9 match) (ice-9 format) @@ -480,9 +481,12 @@ (lambda () (simple-format (current-error-port) "starting downloading the database\n") - (http-get database-uri - #:decode-body? #f - #:streaming? #t)) + (let ((port + socket + (open-socket-for-uri* database-uri))) + (http-get database-uri + #:port port + #:streaming? #t))) (lambda (response body) (when (not (= (response-code response) 200)) (error "unable to fetch database from mirror")) -- cgit v1.2.3