diff options
author | johncming <[email protected]> | 2019-03-17 13:33:11 +0800 |
---|---|---|
committer | Matt Holt <[email protected]> | 2019-03-16 23:33:11 -0600 |
commit | f6e6a6be0446a8455001d6202032b20b64b37569 (patch) | |
tree | 7ab98f8200779eb8c443c2d7af54d55f373ca70a | |
parent | bc5df3b383ee0add2e7015fabc83f7c8d093b30e (diff) | |
download | caddy-f6e6a6be0446a8455001d6202032b20b64b37569.tar.gz caddy-f6e6a6be0446a8455001d6202032b20b64b37569.zip |
caddy: improve error naming (#2526)
-rw-r--r-- | caddy.go | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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 { |