From 90f36693995e1b411094686e4419bb7d11831f35 Mon Sep 17 00:00:00 2001 From: Alexander Chuprov Date: Mon, 14 Oct 2024 16:07:38 +0300 Subject: [PATCH] [#1342] network/cache: Add node address to error multiClient Signed-off-by: Alexander Chuprov --- pkg/network/cache/multi.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkg/network/cache/multi.go b/pkg/network/cache/multi.go index 9305c143b..b83cbb217 100644 --- a/pkg/network/cache/multi.go +++ b/pkg/network/cache/multi.go @@ -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 })