Skip to content

Commit

Permalink
short circuit
Browse files Browse the repository at this point in the history
  • Loading branch information
dragonsinth committed Oct 13, 2022
1 parent ea95dc1 commit 3e1849e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions storage/writer.go
Expand Up @@ -190,6 +190,9 @@ func (w *Writer) openWriter() (err error) {
progress: w.progress,
setObj: func(o *ObjectAttrs) { w.obj = o },
}
if err := w.ctx.Err(); err != nil {
return err // short-circuit
}
w.pw, err = w.o.c.tc.OpenWriter(params, opts...)
if err != nil {
return err
Expand Down

0 comments on commit 3e1849e

Please sign in to comment.