feat: support WithStreamClientInterceptor for zrpc clients (#1907)

* feat: support WithStreamClientInterceptor for zrpc clients

* fix: data race
This commit is contained in:
Kevin Wan
2022-05-14 19:58:17 +08:00
committed by GitHub
parent 95282edb78
commit e80a64fa67
6 changed files with 24 additions and 4 deletions

View File

@@ -71,7 +71,7 @@ func (s *rpcServer) Start(register RegisterFn) error {
WithStreamServerInterceptors(streamInterceptors...))
server := grpc.NewServer(options...)
register(server)
// we need to make sure all others are wrapped up
// 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() {
server.GracefulStop()