mirror of
https://github.com/caddyserver/caddy.git
synced 2025-03-24 06:04:51 +01:00
cmd: Only stop admin server on signal if it exists (fix #3470)
This commit is contained in:
parent
e18c373064
commit
83551edf3e
1 changed files with 8 additions and 6 deletions
|
@ -69,6 +69,7 @@ func gracefulStop(sigName string) {
|
||||||
exitCode = ExitCodeFailedQuit
|
exitCode = ExitCodeFailedQuit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if adminServer != nil {
|
||||||
err = stopAdminServer(adminServer)
|
err = stopAdminServer(adminServer)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
Log().Error("stopping admin endpoint",
|
Log().Error("stopping admin endpoint",
|
||||||
|
@ -77,6 +78,7 @@ func gracefulStop(sigName string) {
|
||||||
exitCode = ExitCodeFailedQuit
|
exitCode = ExitCodeFailedQuit
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Exit codes. Generally, you should NOT
|
// Exit codes. Generally, you should NOT
|
||||||
// automatically restart the process if the
|
// automatically restart the process if the
|
||||||
|
|
Loading…
Add table
Reference in a new issue