summaryrefslogtreecommitdiff
path: root/service/http
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2018-09-23 14:52:55 +0300
committerWolfy-J <[email protected]>2018-09-23 14:52:55 +0300
commit19d88fc879ba403347726138eb532fb85d38168e (patch)
treec93c9ddd7a6fe7be3b884458b3ad8e9f4c9b19ec /service/http
parentbd046974b969af381b3a50513d9f3ab453ed8bbf (diff)
default configs
Diffstat (limited to 'service/http')
-rw-r--r--service/http/config.go2
-rw-r--r--service/http/service.go7
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 {