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'.
This commit is contained in:
parent
0aaca4354c
commit
310709ae58
|
@ -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.
|
;; case we have to try again. Check whether that is the case.
|
||||||
(match (assq 'connection (response-headers resp))
|
(match (assq 'connection (response-headers resp))
|
||||||
(('connection 'close)
|
(('connection 'close)
|
||||||
|
(close-port p)
|
||||||
(connect requests result)) ;try again
|
(connect requests result)) ;try again
|
||||||
(_
|
(_
|
||||||
(loop tail ;keep going
|
(loop tail ;keep going
|
||||||
|
|
Loading…
Reference in New Issue