mirror of
https://github.com/clearlinux/docker.git
synced 2026-10-04 15:58:39 +00:00
Treat systemd listeners as all other
Fix #13549
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
(cherry picked from commit 6f9fa64645)
This commit is contained in:
committed by
Jessica Frazelle
parent
d8eff999e0
commit
d000ba05fd
+10
-8
@@ -97,15 +97,17 @@ func (s *Server) ServeApi(protoAddrs []string) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
s.servers = append(s.servers, srv)
|
||||
s.servers = append(s.servers, srv...)
|
||||
|
||||
go func(proto, addr string) {
|
||||
logrus.Infof("Listening for HTTP on %s (%s)", proto, addr)
|
||||
if err := srv.Serve(); err != nil && strings.Contains(err.Error(), "use of closed network connection") {
|
||||
err = nil
|
||||
}
|
||||
chErrors <- err
|
||||
}(protoAddrParts[0], protoAddrParts[1])
|
||||
for _, s := range srv {
|
||||
logrus.Infof("Listening for HTTP on %s (%s)", protoAddrParts[0], protoAddrParts[1])
|
||||
go func(s serverCloser) {
|
||||
if err := s.Serve(); err != nil && strings.Contains(err.Error(), "use of closed network connection") {
|
||||
err = nil
|
||||
}
|
||||
chErrors <- err
|
||||
}(s)
|
||||
}
|
||||
}
|
||||
|
||||
for i := 0; i < len(protoAddrs); i++ {
|
||||
|
||||
Reference in New Issue
Block a user