diff options
-rw-r--r-- | service/container.go | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/service/container.go b/service/container.go index 18d3ec3b..85f63eeb 100644 --- a/service/container.go +++ b/service/container.go @@ -187,17 +187,18 @@ func (c *container) Serve() error { } } - for { - select { - case fail := <-c.errc: - if fail.err == errTempFix223 { - return nil - } + for fail := range c.errc { + if fail.err == errTempFix223 { + // if we call stop, then stop all plugins + break + } else { c.log.Errorf("[%s]: %s", fail.name, fail.err) c.Stop() return fail.err } } + + return nil } // Detach sends stop command to all running services. |