diff options
Diffstat (limited to 'service/http')
-rw-r--r-- | service/http/config.go | 2 | ||||
-rw-r--r-- | service/http/service.go | 7 |
2 files changed, 3 insertions, 6 deletions
diff --git a/service/http/config.go b/service/http/config.go index 3e1071ac..321072c5 100644 --- a/service/http/config.go +++ b/service/http/config.go @@ -36,7 +36,7 @@ func (c *Config) Hydrate(cfg service.Config) error { } if c.Workers != nil { - c.Workers.SetDefaults() + c.Workers.InitDefaults() } if err := c.Valid(); err != nil { diff --git a/service/http/service.go b/service/http/service.go index 94524897..6bf6e33f 100644 --- a/service/http/service.go +++ b/service/http/service.go @@ -87,11 +87,8 @@ func (s *Service) Serve() error { s.rr.Listen(s.listener) s.srv.Listen(s.listener) - if len(s.middleware) == 0 { - s.http.Handler = s.srv - } else { - s.http.Handler = s - } + s.http.Handler = s + s.mu.Unlock() if err := rr.Start(); err != nil { |