Skip to content

Commit

Permalink
Replace deprecated grpc.Dial with grpc.NewClient api (#858)
Browse files Browse the repository at this point in the history
Signed-off-by: Marikkannu, Suresh <suresh.marikkannu@intel.com>
  • Loading branch information
sureshmarikkannu authored Oct 13, 2024
1 parent d17f17e commit 6079d28
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pfcpiface/bess.go
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ func (b *bess) SetUpfInfo(u *upf, conf *Conf) {

b.endMarkerChan = make(chan []byte, 1024)

b.conn, err = grpc.Dial(*bessIP, grpc.WithTransportCredentials(insecure.NewCredentials()))
b.conn, err = grpc.NewClient(*bessIP, grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
logger.BessLog.Fatalln("did not connect:", err)
}
Expand Down
2 changes: 1 addition & 1 deletion pfcpiface/p4rtc.go
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ func GetConnection(host string) (conn *grpc.ClientConn, err error) {
/* get connection */
logger.P4Log.Infoln("get connection")

conn, err = grpc.Dial(host, grpc.WithTransportCredentials(insecure.NewCredentials()))
conn, err = grpc.NewClient(host, grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
logger.P4Log.Errorln("grpc dial err:", err)
return nil, err
Expand Down

0 comments on commit 6079d28

Please sign in to comment.