1
0
mirror of https://github.com/labstack/echo.git synced 2024-12-24 20:14:31 +02:00

Using read/write timeout in server config

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana 2016-06-15 18:05:48 -07:00
parent 6e183fd3d8
commit 1ca76e5e88
2 changed files with 4 additions and 0 deletions

View File

@ -84,6 +84,8 @@ func WithConfig(c engine.Config) (s *Server) {
}),
logger: glog.New("echo"),
}
s.ReadTimeout = c.ReadTimeout
s.WriteTimeout = c.WriteTimeout
s.Handler = s.ServeHTTP
return
}

View File

@ -82,6 +82,8 @@ func WithConfig(c engine.Config) (s *Server) {
}),
logger: glog.New("echo"),
}
s.ReadTimeout = c.ReadTimeout
s.WriteTimeout = c.WriteTimeout
s.Addr = c.Address
s.Handler = s
return