obj: Object api handle all errors in common location. (#1343)

This commit is contained in:
Harshavardhana
2016-04-20 17:23:23 -07:00
committed by Harshavardhana
parent 5c33b68318
commit 91588209fa
7 changed files with 113 additions and 133 deletions

View File

@@ -148,7 +148,7 @@ func (xl XL) writeErasure(volume, path string, reader *io.PipeReader) {
// Remove previous temp writers for any failure.
xl.cleanupCreateFileOps(volume, path, append(writers, metadataWriters...)...)
reader.CloseWithError(err)
reader.CloseWithError(errWriteQuorum)
return
}
@@ -166,7 +166,7 @@ func (xl XL) writeErasure(volume, path string, reader *io.PipeReader) {
// Remove previous temp writers for any failure.
xl.cleanupCreateFileOps(volume, path, append(writers, metadataWriters...)...)
reader.CloseWithError(err)
reader.CloseWithError(errWriteQuorum)
return
}