forked from TrueCloudLab/frostfs-node
[#1609] morph/client: Retry connecting to failed endpoint during the switch
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
7410827db8
commit
30c7925b3c
2 changed files with 1 additions and 5 deletions
|
@ -13,6 +13,7 @@ Changelog for NeoFS Node
|
|||
- Require SG members to be unique (#1490)
|
||||
- `neofs-cli` now doesn't remove container with LOCK objects without `--force` flag (#1500)
|
||||
- `morph` sections in IR and storage node configuration now accept an address and a priority of an endpoint (#1609)
|
||||
- Morph client now retries connecting to the failed endpoint too (#1609)
|
||||
|
||||
### Fixed
|
||||
|
||||
|
|
|
@ -34,12 +34,7 @@ func (c *Client) switchRPC() bool {
|
|||
|
||||
// Iterate endpoints in the order of decreasing priority.
|
||||
// Skip the current endpoint.
|
||||
last := c.endpoints.curr
|
||||
for c.endpoints.curr = range c.endpoints.list {
|
||||
if c.endpoints.curr == last {
|
||||
continue
|
||||
}
|
||||
|
||||
newEndpoint := c.endpoints.list[c.endpoints.curr].Address
|
||||
cli, err := newWSClient(c.cfg, newEndpoint)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue