forked from TrueCloudLab/frostfs-node
[#1713] node: Add Neo RPC switch interval to the config
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
0631b38da1
commit
9a0824766c
9 changed files with 34 additions and 12 deletions
|
@ -65,7 +65,7 @@ func (c *Client) switchRPC() bool {
|
|||
c.rpcActor = act
|
||||
c.gasToken = gas
|
||||
|
||||
if !c.switchIsActive.Load() &&
|
||||
if c.cfg.switchInterval != 0 && !c.switchIsActive.Load() &&
|
||||
c.endpoints.list[c.endpoints.curr].Priority != c.endpoints.list[0].Priority {
|
||||
c.switchIsActive.Store(true)
|
||||
go c.switchToMostPrioritized()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue