gateway-gcs: Close the writer with error in case of any errors. (#5217)

fixes #5216
master
Krishna Srinivas 7 years ago committed by Dee Koder
parent 4393afb7e2
commit bbd05a8f1c
  1. 2
      cmd/gateway-gcs.go

@ -805,7 +805,7 @@ func (l *gcsGateway) PutObject(bucket string, key string, data *hash.Reader, met
if _, err := io.Copy(w, data); err != nil {
// Close the object writer upon error.
w.Close()
w.CloseWithError(err)
return ObjectInfo{}, gcsToObjectError(traceError(err), bucket, key)
}

Loading…
Cancel
Save