[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: substitute: Fix file descriptor leak in 'http-multiple-get'.

From: Ludovic Courtès
Subject: 01/02: substitute: Fix file descriptor leak in 'http-multiple-get'.
Date: Fri, 01 May 2015 11:11:35 +0000

civodul pushed a commit to branch master
in repository guix.

commit 310709ae58d945b05705f329bca747f07967cd73
Author: Ludovic Courtès <address@hidden>
Date:   Fri May 1 12:50:27 2015 +0200

    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
    * guix/scripts/substitute.scm (http-multiple-get): Call 'close-port'
      before 'connect'.
 guix/scripts/substitute.scm |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm
index adf94a7..b9983c5 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]