diff options
Diffstat (limited to 'service/container.go')
-rw-r--r-- | service/container.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/service/container.go b/service/container.go index 931efd3c..0987b1ae 100644 --- a/service/container.go +++ b/service/container.go @@ -141,6 +141,8 @@ func (c *container) Serve() error { if err := e.svc.Serve(); err != nil { c.log.Errorf("[%s]: %s", e.name, err) done <- errors.Wrap(err, fmt.Sprintf("[%s]", e.name)) + } else { + done <- nil } }(e) } @@ -148,6 +150,11 @@ func (c *container) Serve() error { for i := 0; i < numServing; i++ { result := <-done + if result == nil { + // no errors + continue + } + // found an error in one of the services, stopping the rest of running services. if err := result.(error); err != nil { c.Stop() |