Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
withchao committed Jul 6, 2023
1 parent f5b9024 commit 40d2b4b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
2 changes: 1 addition & 1 deletion pkg/common/chatrpcstart/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func Start(rpcPort int, rpcRegisterName string, prometheusPort int, rpcFn func(c
return errs.Wrap(err)
}
defer zkClient.CloseZK()
zkClient.AddOption(chatMw.TestEmpty(), chatMw.AddUserType(), mw.GrpcClient(), grpc.WithTransportCredentials(insecure.NewCredentials()))
zkClient.AddOption(chatMw.AddUserType(), mw.GrpcClient(), grpc.WithTransportCredentials(insecure.NewCredentials()))
registerIP, err := network.GetRpcRegisterIP(config.Config.Rpc.RegisterIP)
if err != nil {
return err
Expand Down
7 changes: 0 additions & 7 deletions pkg/common/mw/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,3 @@ func AddUserType() grpc.DialOption {
return invoker(ctx, method, req, reply, cc, opts...)
})
}

func TestEmpty() grpc.DialOption {
return grpc.WithChainUnaryInterceptor(func(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error {
log.ZInfo(ctx, "test empty", "method", method)
return invoker(ctx, method, req, reply, cc, opts...)
})
}

0 comments on commit 40d2b4b

Please sign in to comment.