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:
Ludovic Courtès 2015-05-01 12:50:27 +02:00
parent 0aaca4354c
commit 310709ae58

View File

@ -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