From 310709ae58d945b05705f329bca747f07967cd73 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 1 May 2015 12:50:27 +0200 Subject: substitute: Fix file descriptor leak in 'http-multiple-get'. In practice we would not leak much since we reconnect after ~100 requests (with nginx running on hydra.gnu.org.) * guix/scripts/substitute.scm (http-multiple-get): Call 'close-port' before 'connect'. --- guix/scripts/substitute.scm | 1 + 1 file changed, 1 insertion(+) diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm index adf94a7ac3..b9983c5b9c 100755 --- a/guix/scripts/substitute.scm +++ b/guix/scripts/substitute.scm @@ -467,6 +467,7 @@ (define (http-multiple-get base-url requests proc) ;; case we have to try again. Check whether that is the case. (match (assq 'connection (response-headers resp)) (('connection 'close) + (close-port p) (connect requests result)) ;try again (_ (loop tail ;keep going -- cgit v1.2.3