summaryrefslogtreecommitdiff
path: root/libpod/oci_util.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-09-16 15:05:28 -0400
committerGitHub <noreply@github.com>2021-09-16 15:05:28 -0400
commit2a30b60666001b7039aaf5318ffeaa0374433f27 (patch)
tree421afa18f2bdb6c03d2be3872b6135efdf8282da /libpod/oci_util.go
parentfcb22e82b518bd8de31bc152b78d2cbc6ab09964 (diff)
parent29edeaa892df2f533f997adb0736f09a6f8e0965 (diff)
downloadpodman-2a30b60666001b7039aaf5318ffeaa0374433f27.tar.gz
podman-2a30b60666001b7039aaf5318ffeaa0374433f27.tar.bz2
podman-2a30b60666001b7039aaf5318ffeaa0374433f27.zip
Merge pull request #11598 from mheon/34_backportsreleasenotes
Backports and release notes for v3.4.0-RC1
Diffstat (limited to 'libpod/oci_util.go')
-rw-r--r--libpod/oci_util.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/libpod/oci_util.go b/libpod/oci_util.go
index 1cafd5863..f2843b09b 100644
--- a/libpod/oci_util.go
+++ b/libpod/oci_util.go
@@ -68,6 +68,12 @@ func bindPorts(ports []ocicni.PortMapping) ([]*os.File, error) {
return nil, errors.Wrapf(err, "cannot get file for UDP socket")
}
files = append(files, f)
+ // close the listener
+ // note that this does not affect the fd, see the godoc for server.File()
+ err = server.Close()
+ if err != nil {
+ logrus.Warnf("failed to close connection: %v", err)
+ }
case "tcp":
var (
@@ -96,6 +102,13 @@ func bindPorts(ports []ocicni.PortMapping) ([]*os.File, error) {
return nil, errors.Wrapf(err, "cannot get file for TCP socket")
}
files = append(files, f)
+ // close the listener
+ // note that this does not affect the fd, see the godoc for server.File()
+ err = server.Close()
+ if err != nil {
+ logrus.Warnf("failed to close connection: %v", err)
+ }
+
case "sctp":
if !notifySCTP {
notifySCTP = true