mirror of
https://github.com/labstack/echo.git
synced 2025-01-26 03:20:08 +02:00
Fixed null pointer on standard engine
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
parent
79f7be2e21
commit
86ddfedb45
@ -42,10 +42,7 @@ func NewWithTLS(addr, certfile, keyfile string) *Server {
|
|||||||
|
|
||||||
func NewWithConfig(c *engine.Config) (s *Server) {
|
func NewWithConfig(c *engine.Config) (s *Server) {
|
||||||
s = &Server{
|
s = &Server{
|
||||||
server: &http.Server{
|
server: new(http.Server),
|
||||||
Addr: c.Address,
|
|
||||||
Handler: s,
|
|
||||||
},
|
|
||||||
config: c,
|
config: c,
|
||||||
pool: &Pool{
|
pool: &Pool{
|
||||||
request: sync.Pool{
|
request: sync.Pool{
|
||||||
@ -74,6 +71,8 @@ func NewWithConfig(c *engine.Config) (s *Server) {
|
|||||||
}),
|
}),
|
||||||
logger: log.New("echo"),
|
logger: log.New("echo"),
|
||||||
}
|
}
|
||||||
|
s.server.Addr = c.Address
|
||||||
|
s.server.Handler = s
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user