diff options
Diffstat (limited to 'service')
-rw-r--r-- | service/injector.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/service/injector.go b/service/injector.go index e7dfaa0b..2d18b651 100644 --- a/service/injector.go +++ b/service/injector.go @@ -77,7 +77,7 @@ func injectValues(m reflect.Method, s interface{}, cfg Config, c *container) (va // looking for the service candidate for _, e := range c.services { - if v.ConvertibleTo(reflect.ValueOf(e.svc).Type()) { + if v.ConvertibleTo(reflect.ValueOf(e.svc).Type()) && e.hasStatus(StatusOK) { found = true values = append(values, reflect.ValueOf(e.svc)) break |