Skip to content

Commit 76f09ff

Browse files
committed
Notify client about failed upload
1 parent d292467 commit 76f09ff

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

bucketio.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,10 @@ func (oow *S3PutObjectWriter) Close() error {
194194
if err != nil {
195195
oow.Log.Debug("=> ", err)
196196
F(oow.Log.Error, "failed to put object: %s", err.Error())
197-
} else {
198-
oow.Log.Debug("=> OK")
197+
return err
199198
}
199+
200+
oow.Log.Debug("=> OK")
200201
return nil
201202
}
202203

@@ -211,6 +212,7 @@ func (oow *S3PutObjectWriter) WriteAt(buf []byte, off int64) (int, error) {
211212
F(oow.Log.Debug, "len(buf)=%d, off=%d", len(buf), off)
212213
n, err := oow.writer.WriteAt(buf, off)
213214
oow.Info.SetSize(oow.writer.Size())
215+
214216
return n, err
215217
}
216218

0 commit comments

Comments
 (0)