[#2164] neofs-node: Allow to set reconnect interval
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
6f5edac730
commit
741482c26f
10 changed files with 34 additions and 8 deletions
3
pkg/network/cache/multi.go
vendored
3
pkg/network/cache/multi.go
vendored
|
@ -36,6 +36,9 @@ type multiClient struct {
|
|||
const defaultReconnectInterval = time.Second * 30
|
||||
|
||||
func newMultiClient(addr network.AddressGroup, opts ClientCacheOpts) *multiClient {
|
||||
if opts.ReconnectTimeout <= 0 {
|
||||
opts.ReconnectTimeout = defaultReconnectInterval
|
||||
}
|
||||
return &multiClient{
|
||||
clients: make(map[string]*singleClient),
|
||||
addr: addr,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue