mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-23 00:56:45 +01:00
onevent: add missing return error (#2525)
This commit is contained in:
parent
1a0292b830
commit
bc5df3b383
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue