mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-19 09:22:05 -05:00
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'.
This commit is contained in:
parent
097a951e96
commit
14d6ca3e4d
1 changed files with 4 additions and 3 deletions
|
@ -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 @@ (define-module (guix scripts lint)
|
|||
#: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 @@ (define response
|
|||
(force-output port)
|
||||
(read-response port))
|
||||
(lambda ()
|
||||
(close port))))
|
||||
(close-connection port))))
|
||||
|
||||
(case (response-code response)
|
||||
((301 302 307)
|
||||
|
|
Loading…
Reference in a new issue