1
0
mirror of https://github.com/labstack/echo.git synced 2025-01-12 01:22:21 +02:00

Fixed null pointer on standard engine

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana 2016-03-08 15:17:40 -08:00
parent 79f7be2e21
commit 86ddfedb45

View File

@ -42,10 +42,7 @@ func NewWithTLS(addr, certfile, keyfile string) *Server {
func NewWithConfig(c *engine.Config) (s *Server) {
s = &Server{
server: &http.Server{
Addr: c.Address,
Handler: s,
},
server: new(http.Server),
config: c,
pool: &Pool{
request: sync.Pool{
@ -74,6 +71,8 @@ func NewWithConfig(c *engine.Config) (s *Server) {
}),
logger: log.New("echo"),
}
s.server.Addr = c.Address
s.server.Handler = s
return
}