Skip to content

Commit

Permalink
storage: storage.(*Writer).Write() with cancelled context causes writ…
Browse files Browse the repository at this point in the history
…e race
  • Loading branch information
dragonsinth committed Oct 13, 2022
1 parent ae7441a commit 3bfc48b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion storage/writer.go
Expand Up @@ -176,7 +176,6 @@ func (w *Writer) openWriter() (err error) {

isIdempotent := w.o.conds != nil && (w.o.conds.GenerationMatch >= 0 || w.o.conds.DoesNotExist == true)
opts := makeStorageOpts(isIdempotent, w.o.retry, w.o.userProject)
go w.monitorCancel()
params := &openWriterParams{
ctx: w.ctx,
chunkSize: w.ChunkSize,
Expand All @@ -196,6 +195,7 @@ func (w *Writer) openWriter() (err error) {
return err
}
w.opened = true
go w.monitorCancel()

return nil
}
Expand Down

0 comments on commit 3bfc48b

Please sign in to comment.