aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-05-01 12:50:27 +0200
committerLudovic Courtès <ludo@gnu.org>2015-05-01 12:50:27 +0200
commit310709ae58d945b05705f329bca747f07967cd73 (patch)
tree966e2c91a045b3b49bf1f74f330bb55fa8adb375
parent0aaca4354c68a21b01ce5fcd7fb7f820e58fc3cb (diff)
downloadpatches-310709ae58d945b05705f329bca747f07967cd73.tar
patches-310709ae58d945b05705f329bca747f07967cd73.tar.gz
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'.
-rwxr-xr-xguix/scripts/substitute.scm1
1 files changed, 1 insertions, 0 deletions
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 @@ to read the response body. Return the list of results."
;; 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