[#1342] network/cache: Add node address to error multiClient

Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
This commit is contained in:
Alexander Chuprov 2024-10-14 16:07:38 +03:00 committed by Evgenii Stratonikov
parent 07ce40e119
commit 90f3669399

View file

@ -169,15 +169,16 @@ func (x *multiClient) iterateClients(ctx context.Context, f func(clientcore.Clie
var siErr *objectSDK.SplitInfoError
var eiErr *objectSDK.ECInfoError
if err != nil {
err = fmt.Errorf("client connection error at %v: %w", addr, err)
x.ReportError(err)
}
success := err == nil || errors.Is(err, context.Canceled) || errors.As(err, &siErr) || errors.As(err, &eiErr)
if success || firstErr == nil || errors.Is(firstErr, errRecentlyFailed) {
firstErr = err
}
if err != nil {
x.ReportError(err)
}
return success
})