caddy: improve error naming (#2526)

This commit is contained in:
johncming 2019-03-17 13:33:11 +08:00 committed by Matt Holt
parent bc5df3b383
commit f6e6a6be04

View file

@ -193,9 +193,8 @@ func (i *Instance) Restart(newCaddyfile Input) (*Instance, error) {
r := recover()
if err != nil || r != nil {
for _, fn := range i.OnRestartFailed {
err2 := fn()
if err2 != nil {
log.Printf("[ERROR] Restart failed callback returned error: %v", err2)
if err := fn(); err != nil {
log.Printf("[ERROR] Restart failed callback returned error: %v", err)
}
}
if err != nil {