chore: update restful/grpc servers shutdown stages (#3662)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user