Commit 0e0a641f authored by Uladzimir Trehubenka's avatar Uladzimir Trehubenka Committed by Miek Gieben

Fixed NewServer() init logic (#1637)

parent 6d272e31
...@@ -66,6 +66,17 @@ func NewServer(addr string, group []*Config) (*Server, error) { ...@@ -66,6 +66,17 @@ func NewServer(addr string, group []*Config) (*Server, error) {
// compile custom plugin for everything // compile custom plugin for everything
if site.registry != nil { if site.registry != nil {
// this config is already computed with the chain of plugin // this config is already computed with the chain of plugin
// set classChaos in accordance with previously registered plugins
for name := range enableChaos {
if _, ok := site.registry[name]; ok {
s.classChaos = true
break
}
}
// set trace handler in accordance with previously registered "trace" plugin
if handler, ok := site.registry["trace"]; ok {
s.trace = handler.(trace.Trace)
}
continue continue
} }
var stack plugin.Handler var stack plugin.Handler
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment