Skip to content

Commit

Permalink
add net.Dialer with dialTimeout for nsmgr
Browse files Browse the repository at this point in the history
Signed-off-by: Denis Tingaikin <denis.tingajkin@xored.com>
  • Loading branch information
denis-tingaikin committed Oct 31, 2021
1 parent 93f77d4 commit f18ef31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/manager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}),
Expand Down

0 comments on commit f18ef31

Please sign in to comment.