From ca17eb0eb4352c2aa2869c586b63bc7a9cef6213 Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Thu, 3 Mar 2022 16:26:43 +0300 Subject: [PATCH] [#1211] innerring: Fix objectIDs list reader Signed-off-by: Alex Vanin --- pkg/innerring/internal/client/client.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkg/innerring/internal/client/client.go b/pkg/innerring/internal/client/client.go index 2d380324..f011c768 100644 --- a/pkg/innerring/internal/client/client.go +++ b/pkg/innerring/internal/client/client.go @@ -81,14 +81,13 @@ func (x Client) SearchSG(prm SearchSGPrm) (*SearchSGRes, error) { for { n, ok = rdr.Read(buf) - if !ok { - break - } - for i := 0; i < n; i++ { v := buf[i] list = append(list, &v) } + if !ok { + break + } } res, err := rdr.Close()