VOL-2894 - reference the voltha GRPC end point via a holder
Change-Id: If24299556ad6cacf9cd0f793167a2c908534729c
diff --git a/internal/pkg/ofagent/refresh.go b/internal/pkg/ofagent/refresh.go
index 835e551..1744578 100644
--- a/internal/pkg/ofagent/refresh.go
+++ b/internal/pkg/ofagent/refresh.go
@@ -18,10 +18,11 @@
import (
"context"
+ "time"
+
"github.com/golang/protobuf/ptypes/empty"
"github.com/opencord/ofagent-go/internal/pkg/openflow"
"github.com/opencord/voltha-lib-go/v3/pkg/log"
- "time"
)
func (ofa *OFAgent) synchronizeDeviceList(ctx context.Context) {
@@ -48,7 +49,7 @@
ofa.events <- ofaEventVolthaDisconnected
return
}
- deviceList, err := ofa.volthaClient.ListLogicalDevices(context.Background(), &empty.Empty{})
+ deviceList, err := ofa.volthaClient.Get().ListLogicalDevices(context.Background(), &empty.Empty{})
if err != nil {
logger.Errorw("ofagent failed to query device list from voltha",
log.Fields{"error": err})