Skip to content

Commit d65d88f

Browse files
committed
replace deprecated func
1 parent 5307c5f commit d65d88f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

server/cmd/wsnet2-tool/cmd/room.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func selectGrpcServers(ctx context.Context, ids []string) (map[string]*grpcServe
4444
}
4545

4646
func (s *grpcServer) Dial() (*grpc.ClientConn, error) {
47-
return grpc.Dial(fmt.Sprintf("%s:%d", s.Host, s.Port),
47+
return grpc.NewClient(fmt.Sprintf("%s:%d", s.Host, s.Port),
4848
grpc.WithTransportCredentials(insecure.NewCredentials()))
4949
}
5050

server/common/grpcpool.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func (p *GrpcPool) Get(target string) (*grpc.ClientConn, error) {
2828
return cc, nil
2929
}
3030

31-
cc, err := grpc.Dial(target, p.opts...)
31+
cc, err := grpc.NewClient(target, p.opts...)
3232
if err != nil {
3333
return nil, err
3434
}

0 commit comments

Comments
 (0)