VOL-2894 - reference the voltha GRPC end point via a holder
Change-Id: If24299556ad6cacf9cd0f793167a2c908534729c
diff --git a/internal/pkg/openflow/feature.go b/internal/pkg/openflow/feature.go
index 82353db..99da50c 100644
--- a/internal/pkg/openflow/feature.go
+++ b/internal/pkg/openflow/feature.go
@@ -19,6 +19,7 @@
import (
"context"
"encoding/json"
+
ofp "github.com/donNewtonAlpha/goloxi/of13"
"github.com/opencord/voltha-lib-go/v3/pkg/log"
"github.com/opencord/voltha-protos/v3/go/common"
@@ -32,11 +33,12 @@
"device-id": ofc.DeviceID,
"request": js})
}
- if ofc.VolthaClient == nil {
+ volthaClient := ofc.VolthaClient.Get()
+ if volthaClient == nil {
return NoVolthaConnectionError
}
var id = common.ID{Id: ofc.DeviceID}
- logicalDevice, err := ofc.VolthaClient.GetLogicalDevice(context.Background(), &id)
+ logicalDevice, err := volthaClient.GetLogicalDevice(context.Background(), &id)
if err != nil {
return err
}