chore: use grpc.NewClient instead of deprecated grpc.Dial

This commit is contained in:
Jonathan Barrow 2026-01-20 20:35:03 -05:00
parent 597430b2dd
commit 634be56091
No known key found for this signature in database
GPG Key ID: 2A7DAA6DED5A77E5

View File

@ -60,7 +60,7 @@ func init() {
globals.Logger.Warning("Insecure gRPC server detected. PN_FRIENDS_CONFIG_ACCOUNT_GRPC_API_KEY environment variable not set")
}
globals.GRPCAccountClientConnection, err = grpc.Dial(fmt.Sprintf("%s:%s", globals.Config.AccountGRPCHost, globals.Config.AccountGRPCPort), grpc.WithTransportCredentials(insecure.NewCredentials()))
globals.GRPCAccountClientConnection, err = grpc.NewClient(fmt.Sprintf("%s:%d", globals.Config.AccountGRPCHost, globals.Config.AccountGRPCPort), grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
globals.Logger.Criticalf("Failed to connect to account gRPC server: %v", err)
os.Exit(0)