mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-27 20:35:58 +03:00
caddy: improve error naming (#2526)
This commit is contained in:
parent
bc5df3b383
commit
f6e6a6be04
1 changed files with 2 additions and 3 deletions
5
caddy.go
5
caddy.go
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue