|
|
@ -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))
|
|
|
|
healthManager := health.NewHealthManager(fmt.Sprintf("%s-%s:%d", probeNamePrefix, host, port))
|
|
|
|
|
|
|
|
|
|
|
|
waitForCalled := proc.AddWrapUpListener(func() {
|
|
|
|
waitForCalled := proc.AddShutdownListener(func() {
|
|
|
|
healthManager.MarkNotReady()
|
|
|
|
healthManager.MarkNotReady()
|
|
|
|
if e := server.Shutdown(context.Background()); e != nil {
|
|
|
|
if e := server.Shutdown(context.Background()); e != nil {
|
|
|
|
logx.Error(e)
|
|
|
|
logx.Error(e)
|
|
|
|