mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
return when error happens on listener close
Signed-off-by: Harry Zhang <harryz@hyper.sh>
This commit is contained in:
parent
aa90a531c5
commit
390fe752a2
1 changed files with 1 additions and 3 deletions
|
@ -8,7 +8,6 @@ import (
|
||||||
"net"
|
"net"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/Sirupsen/logrus"
|
|
||||||
"github.com/coreos/go-systemd/activation"
|
"github.com/coreos/go-systemd/activation"
|
||||||
"github.com/docker/go-connections/sockets"
|
"github.com/docker/go-connections/sockets"
|
||||||
)
|
)
|
||||||
|
@ -86,8 +85,7 @@ func listenFD(addr string, tlsConfig *tls.Config) ([]net.Listener, error) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if err := ls.Close(); err != nil {
|
if err := ls.Close(); err != nil {
|
||||||
// TODO: We shouldn't log inside a library. Remove this or error out.
|
return nil, fmt.Errorf("failed to close systemd activated file: fd %d: %v", fdOffset+3, err)
|
||||||
logrus.Errorf("failed to close systemd activated file: fd %d: %v", fdOffset+3, err)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return []net.Listener{listeners[fdOffset]}, nil
|
return []net.Listener{listeners[fdOffset]}, nil
|
||||||
|
|
Loading…
Reference in a new issue