morph: Reconnect to the highest priority endpoint, support/v0.42 #1293
1 changed files with 4 additions and 0 deletions
|
@ -148,6 +148,10 @@ func New(ctx context.Context, key *keys.PrivateKey, opts ...Option) (*Client, er
|
||||||
} else {
|
} else {
|
||||||
cli.logger.Info(logs.FrostFSIRCreatedRPCClientForEndpoint,
|
cli.logger.Info(logs.FrostFSIRCreatedRPCClientForEndpoint,
|
||||||
zap.String("endpoint", endpoint.Address))
|
zap.String("endpoint", endpoint.Address))
|
||||||
|
if cli.endpoints.curr > 0 && cli.cfg.switchInterval != 0 {
|
||||||
|
cli.switchIsActive.Store(true)
|
||||||
|
go cli.switchToMostPrioritized(ctx)
|
||||||
|
}
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue