server: remove if registry != nil code (#2735)
I can't find what's this code should be doing and it looks like it's not doing anything. Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
parent
ba87a0e6ba
commit
b75478e73b
1 changed files with 1 additions and 15 deletions
|
@ -66,22 +66,8 @@ func NewServer(addr string, group []*Config) (*Server, error) {
|
|||
}
|
||||
// set the config per zone
|
||||
s.zones[site.Zone] = site
|
||||
|
||||
// compile custom plugin for everything
|
||||
if site.registry != nil {
|
||||
// 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
|
||||
}
|
||||
var stack plugin.Handler
|
||||
for i := len(site.Plugin) - 1; i >= 0; i-- {
|
||||
stack = site.Plugin[i](stack)
|
||||
|
|
Loading…
Add table
Reference in a new issue