[#741] Fix data race

Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
This commit is contained in:
Angira Kekteeva 2022-11-16 14:32:27 +04:00 committed by Alex Vanin
parent d1825f97fb
commit f5fe9a9b4b

View file

@ -406,7 +406,10 @@ func (n *layer) objectPutAndHash(ctx context.Context, prm PrmObjectCreate, bktIn
hash.Write(buf) hash.Write(buf)
}) })
id, err := n.neoFS.CreateObject(ctx, prm) id, err := n.neoFS.CreateObject(ctx, prm)
return id, hash.Sum(nil), err if err != nil {
return oid.ID{}, nil, err
}
return id, hash.Sum(nil), nil
} }
// ListObjectsV1 returns objects in a bucket for requests of Version 1. // ListObjectsV1 returns objects in a bucket for requests of Version 1.