Merge pull request #13559 from LK4D4/fix_systemd_listen
Treat systemd listeners as all other Upstream-commit: 1f22676fcb2c6f2bd1a1cbf6123587c4d4e917d0 Component: engine
This commit is contained in:
@ -96,15 +96,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