me
/
guix
Archived
1
0
Fork 0

marionette: 'wait-for' procedures no longer leak a port.

* gnu/build/marionette.scm (wait-for-tcp-port): Close SOCK upon
success.
(wait-for-unix-socket): Likewise.
master
Ludovic Courtès 2020-02-18 18:21:55 +01:00
parent 3c4c60fa79
commit 1708ed6e9d
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
;;;
;;; This file is part of GNU Guix.
@ -204,6 +204,7 @@ MARIONETTE. Raise an error on failure."
(catch 'system-error
(lambda ()
(connect sock AF_INET INADDR_LOOPBACK ,port)
(close-port sock)
'success)
(lambda args
(if (< i ,timeout)
@ -227,6 +228,7 @@ accept connections in MARIONETTE. Raise an error on failure."
(catch 'system-error
(lambda ()
(connect sock AF_UNIX ,file-name)
(close-port sock)
'success)
(lambda args
(if (< i ,timeout)