From 0d09fc2b9dbca792737076b90b721f46213a3a36 Mon Sep 17 00:00:00 2001 From: zhaoshichen Date: Thu, 18 Jul 2019 11:42:25 +0800 Subject: [PATCH] add --- pkg/net/http/blademaster/server.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/net/http/blademaster/server.go b/pkg/net/http/blademaster/server.go index 23e49f4b5..6d81b16c8 100644 --- a/pkg/net/http/blademaster/server.go +++ b/pkg/net/http/blademaster/server.go @@ -177,9 +177,6 @@ func NewServer(conf *ServerConfig) *Engine { basePath: "/", root: true, }, - conf: &ServerConfig{ - Timeout: xtime.Duration(time.Second), - }, address: ip.InternalIP(), trees: make(methodTrees, 0, 9), metastore: make(map[string]map[string]interface{}), @@ -187,6 +184,9 @@ func NewServer(conf *ServerConfig) *Engine { HandleMethodNotAllowed: true, injections: make([]injection, 0), } + if err := engine.SetConfig(conf); err != nil { + panic(err) + } engine.RouterGroup.engine = engine // NOTE add prometheus monitor location engine.addRoute("GET", "/metrics", monitor())