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

@@ -76,7 +76,7 @@ func (s *rpcServer) Start(register RegisterFn) error {
// we need to make sure all others are wrapped up,
// so we do graceful stop at shutdown phase instead of wrap up phase
waitForCalled := proc.AddWrapUpListener(func() {
waitForCalled := proc.AddShutdownListener(func() {
if s.health != nil {
s.health.Shutdown()
}

View File

@@ -47,7 +47,7 @@ func TestRpcServer(t *testing.T) {
grpcServer.GracefulStop()
lock.Unlock()
proc.WrapUp()
proc.Shutdown()
wgDone.Wait()
}