onevent: add missing return error (#2525)

This commit is contained in:
johncming 2019-03-16 12:43:28 +08:00 committed by Matt Holt
parent 1a0292b830
commit bc5df3b383

View file

@ -20,12 +20,15 @@ func setup(c *caddy.Controller) error {
}
// Register Event Hooks.
c.OncePerServerBlock(func() error {
err = c.OncePerServerBlock(func() error {
for _, cfg := range config {
caddy.RegisterEventHook("on-"+cfg.ID, cfg.Hook)
}
return nil
})
if err != nil {
return err
}
return nil
}