[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/05: lint: Do not leak file descriptors for TLS connections.
From: |
Ludovic Courtès |
Subject: |
03/05: lint: Do not leak file descriptors for TLS connections. |
Date: |
Thu, 17 Mar 2016 22:54:24 +0000 |
civodul pushed a commit to branch master
in repository guix.
commit 14d6ca3e4dd23ee92adb5e2fcf58546e67534631
Author: Ludovic Courtès <address@hidden>
Date: Thu Mar 17 21:36:22 2016 +0100
lint: Do not leak file descriptors for TLS connections.
Partially fixes <http://bugs.gnu.org/20145>.
* guix/scripts/lint.scm (probe-uri): Use 'close-connection' instead of
'close-port'.
---
guix/scripts/lint.scm | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm
index f135bde..27b9e15 100644
--- a/guix/scripts/lint.scm
+++ b/guix/scripts/lint.scm
@@ -20,7 +20,7 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (guix scripts lint)
- #:use-module (guix store)
+ #:use-module ((guix store) #:hide (close-connection))
#:use-module (guix base32)
#:use-module (guix download)
#:use-module (guix ftp-client)
@@ -41,7 +41,8 @@
#:use-module (web uri)
#:use-module ((guix build download)
#:select (maybe-expand-mirrors
- open-connection-for-uri))
+ open-connection-for-uri
+ close-connection))
#:use-module (web request)
#:use-module (web response)
#:use-module (srfi srfi-1)
@@ -296,7 +297,7 @@ for connections to complete; when TIMEOUT is #f, wait as
long as needed."
(force-output port)
(read-response port))
(lambda ()
- (close port))))
+ (close-connection port))))
(case (response-code response)
((301 302 307)