[#205] sdk/client: Support option to set dial timeout
There is a need to set dial timeout in SDK client that is used in case of internal connection opening. Add DialTimeout option constructor to support this feature. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
03ac6bedb4
commit
5ee500bb43
6 changed files with 23 additions and 8 deletions
|
@ -97,8 +97,9 @@ func v2NetmapClientFromOptions(opts *clientOptions) (cli *v2netmap.Client, err e
|
|||
|
||||
case opts.addr != "":
|
||||
cli, err = v2netmap.NewClient(v2netmap.WithGlobalOpts(
|
||||
client.WithNetworkAddress(opts.addr)),
|
||||
)
|
||||
client.WithNetworkAddress(opts.addr),
|
||||
client.WithDialTimeout(opts.dialTimeout),
|
||||
))
|
||||
|
||||
default:
|
||||
return nil, errOptionsLack("Netmap")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue