forked from TrueCloudLab/frostfs-sdk-go
[#317] client: Fix processing of the Object PUT failed response
In previous implementation `ObjectWrite.Close` called `close` method which in turn called `result` callback. Thus failed statuses could lead to false-positive result processing. Replace calling `close` method with direct `closer` method's call in `ObjectWrite.Close`. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
4e31b4f231
commit
f8148c954b
1 changed files with 1 additions and 1 deletions
|
@ -179,7 +179,7 @@ func (x *ObjectWriter) Close() (*ResObjectPut, error) {
|
|||
return nil, x.ctxCall.err
|
||||
}
|
||||
|
||||
if !x.ctxCall.close() {
|
||||
if x.ctxCall.err = x.ctxCall.closer(); x.ctxCall.err != nil {
|
||||
return nil, x.ctxCall.err
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue