Commit f6e6a6be authored by johncming's avatar johncming Committed by Matt Holt

caddy: improve error naming (#2526)

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