[#131] pool: Remove redundant var from pool.PutObject

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2022-02-11 08:03:14 +03:00
parent c8855620b5
commit 32c6e927a0

View file

@ -714,13 +714,11 @@ func (p *pool) PutObject(ctx context.Context, hdr object.Object, payload io.Read
buf := make([]byte, sz)
var n int
var ok bool
for {
n, err = payload.Read(buf)
if n > 0 {
ok = wObj.WritePayloadChunk(buf[:n])
if !ok {
if !wObj.WritePayloadChunk(buf[:n]) {
break
}