[VOL-4514] Addressing device reconciliation failure

See comments on https://jira.opencord.org/browse/VOL-4514

This change is dependent on the related proto and voltha lib go
changes to be merged first.  Until then jenkins will fail.

Change-Id: If1562627d22529f4e0c9c8db6c1d40df558a84de
diff --git a/cmd/openolt-adapter/main.go b/cmd/openolt-adapter/main.go
index 031651f..434fc83 100644
--- a/cmd/openolt-adapter/main.go
+++ b/cmd/openolt-adapter/main.go
@@ -26,7 +26,6 @@
 	"syscall"
 	"time"
 
-	"github.com/golang/protobuf/ptypes/empty"
 	conf "github.com/opencord/voltha-lib-go/v7/pkg/config"
 	"github.com/opencord/voltha-lib-go/v7/pkg/db/kvstore"
 	"github.com/opencord/voltha-lib-go/v7/pkg/events"
@@ -39,6 +38,7 @@
 	"github.com/opencord/voltha-openolt-adapter/internal/pkg/config"
 	ac "github.com/opencord/voltha-openolt-adapter/internal/pkg/core"
 	"github.com/opencord/voltha-protos/v5/go/adapter_service"
+	"github.com/opencord/voltha-protos/v5/go/common"
 	ca "github.com/opencord/voltha-protos/v5/go/core_adapter"
 	"github.com/opencord/voltha-protos/v5/go/core_service"
 	"github.com/opencord/voltha-protos/v5/go/health"
@@ -130,9 +130,10 @@
 
 	// Create the Core client to handle requests to the Core.  Note that the coreClient is an interface and needs to be
 	// cast to the appropriate grpc client by invoking GetCoreGrpcClient on the a.coreClient
-	if a.coreClient, err = vgrpc.NewClient(a.config.CoreEndpoint,
-		a.coreRestarted,
-		vgrpc.ActivityCheck(true)); err != nil {
+	if a.coreClient, err = vgrpc.NewClient(
+		a.config.AdapterEndpoint,
+		a.config.CoreEndpoint,
+		a.coreRestarted); err != nil {
 		logger.Fatal(ctx, "grpc-client-not-created")
 	}
 	// Start the core grpc client
@@ -171,9 +172,9 @@
 }
 
 // setAndTestCoreServiceHandler is used to test whether the remote gRPC service is up
-func setAndTestCoreServiceHandler(ctx context.Context, conn *grpc.ClientConn) interface{} {
+func setAndTestCoreServiceHandler(ctx context.Context, conn *grpc.ClientConn, clientConn *common.Connection) interface{} {
 	svc := core_service.NewCoreServiceClient(conn)
-	if h, err := svc.GetHealthStatus(ctx, &empty.Empty{}); err != nil || h.State != health.HealthStatus_HEALTHY {
+	if h, err := svc.GetHealthStatus(ctx, clientConn); err != nil || h.State != health.HealthStatus_HEALTHY {
 		return nil
 	}
 	return svc