From fd985859663e61469d5d7e8ac3adda857788c690 Mon Sep 17 00:00:00 2001 From: Vladyslav Tatarin <48694776+VTGare@users.noreply.github.com> Date: Wed, 28 Aug 2024 15:39:59 +0300 Subject: [PATCH] ZING-34847: use same options for data receiver and registry (#32) * use same options for data receiver and registry * reuse connection --- endpoint/endpoint.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/endpoint/endpoint.go b/endpoint/endpoint.go index 1d3db4e..afa6e7d 100644 --- a/endpoint/endpoint.go +++ b/endpoint/endpoint.go @@ -272,9 +272,7 @@ func New(config Config) (*Endpoint, error) { // Dial doesn't block by default. So no error can actually occur. conn, _ := grpc.Dial(config.Address, dialOptions...) client = data_receiver.NewDataReceiverServiceClient(conn) - regDialOption := grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{})) - regconn, _ := grpc.Dial(config.Address, regDialOption) - regclient = data_registry.NewDataRegistryServiceClient(regconn) + regclient = data_registry.NewDataRegistryServiceClient(conn) } var cache *ttlcache.Cache[string, MetricIDNameAndHash]