diff options
Diffstat (limited to 'admin.go')
-rw-r--r-- | admin.go | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -39,6 +39,7 @@ import ( "sync" "time" + "github.com/caddyserver/caddy/v2/notify" "github.com/caddyserver/certmagic" "github.com/prometheus/client_golang/prometheus" "go.uber.org/zap" @@ -905,6 +906,11 @@ func handleStop(w http.ResponseWriter, r *http.Request) error { Err: fmt.Errorf("method not allowed"), } } + + if err := notify.NotifyStopping(); err != nil { + Log().Error("unable to notify stopping to service manager", zap.Error(err)) + } + exitProcess(Log().Named("admin.api")) return nil } |