From f18ef3135c9888bd22506278a0b86263f9c33208 Mon Sep 17 00:00:00 2001 From: Denis Tingaikin Date: Sun, 31 Oct 2021 21:55:33 +0700 Subject: [PATCH] add net.Dialer with dialTimeout for nsmgr Signed-off-by: Denis Tingaikin --- internal/manager/manager.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/manager/manager.go b/internal/manager/manager.go index c79a2699..7ca46949 100644 --- a/internal/manager/manager.go +++ b/internal/manager/manager.go @@ -116,7 +116,7 @@ func RunNsmgr(ctx context.Context, configuration *config.Config) error { credentials.NewTLS(tlsconfig.MTLSClientConfig(m.source, m.source, tlsconfig.AuthorizeAny())), ), ), - grpc.WithDialer(func(s string, _ time.Duration) (net.Conn, error) { + grpc.WithContextDialer(func(ctx context.Context, s string) (net.Conn, error) { network, addr := grpcutils.TargetToNetAddr(s) return (&net.Dialer{Timeout: configuration.DialTimeout}).DialContext(ctx, network, addr) }),