chore: update restful/grpc servers shutdown stages (#3662)

This commit is contained in:
Kevin Wan
2023-10-23 21:03:05 +08:00
committed by GitHub
parent 00db97fcc1
commit c2ff00883a
3 changed files with 3 additions and 3 deletions

View File

@@ -43,7 +43,7 @@ func start(host string, port int, handler http.Handler, run func(svr *http.Serve
}
healthManager := health.NewHealthManager(fmt.Sprintf("%s-%s:%d", probeNamePrefix, host, port))
waitForCalled := proc.AddWrapUpListener(func() {
waitForCalled := proc.AddShutdownListener(func() {
healthManager.MarkNotReady()
if e := server.Shutdown(context.Background()); e != nil {
logx.Error(e)