diff options
author | Christopher Baines <mail@cbaines.net> | 2023-09-11 12:34:50 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2023-09-12 13:11:00 +0100 |
commit | 27e6906e188da98ce06e755c079e852bc01c770d (patch) | |
tree | f6cb00c1513e549d0342f09993221597fca8372b /scripts | |
parent | 69fff1fc640257b8f5338810f572b209318f5554 (diff) | |
download | nar-herder-27e6906e188da98ce06e755c079e852bc01c770d.tar nar-herder-27e6906e188da98ce06e755c079e852bc01c770d.tar.gz |
Make sure to use streaming http requests everywhere
As this avoids blocking.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/nar-herder.in | 10 |
1 files changed, 7 insertions, 3 deletions
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")) |