diff options
author | Wolfy-J <[email protected]> | 2018-06-19 14:48:02 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2018-06-19 14:48:02 +0300 |
commit | e6988d06a2e9d6080ccbc38caa3ef8495b6e4f76 (patch) | |
tree | d14049c57aa05d853cbd09261bcc58d60cdb46a7 /service/container.go | |
parent | b38a32804261c156695882aa7ca0162fed535b71 (diff) |
better channel handling
Diffstat (limited to 'service/container.go')
-rw-r--r-- | service/container.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/service/container.go b/service/container.go index 98b24a11..bf5f6089 100644 --- a/service/container.go +++ b/service/container.go @@ -125,7 +125,6 @@ func (c *container) Serve() error { numServing int done = make(chan interface{}, len(c.services)) ) - defer close(done) for _, e := range c.services { if e.hasStatus(StatusConfigured) { @@ -142,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) } |