This commit is contained in:
wangchuxiao
2022-09-15 01:35:08 +08:00
parent 07170135e6
commit aa6b439e8c
8 changed files with 8 additions and 8 deletions
@@ -56,7 +56,7 @@ func (r *RPCServer) run() {
defer listener.Close()
var grpcOpts []grpc.ServerOption
if config.Config.Prometheus.Enable {
grpcOpts = append(grpcOpts, promePkg.UnaryServerInterceptorProme)
grpcOpts = append(grpcOpts, grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme))
}
srv := grpc.NewServer(grpcOpts...)
defer srv.GracefulStop()