mirror of
https://github.com/minio/minio.git
synced 2025-11-07 04:42:56 -05:00
erasure: waitCloser should implement CloseWithError. (#1543)
This is needed so that the other end of the pipe receives and error, cleanups temporary files.
This commit is contained in:
@@ -144,9 +144,9 @@ func safeCloseAndRemove(writer io.WriteCloser) error {
|
||||
if ok {
|
||||
return safeWriter.CloseAndRemove()
|
||||
}
|
||||
pipeWriter, ok := writer.(*io.PipeWriter)
|
||||
wCloser, ok := writer.(*waitCloser)
|
||||
if ok {
|
||||
return pipeWriter.CloseWithError(errors.New("Close and error out."))
|
||||
return wCloser.CloseWithError(errors.New("Close and error out."))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user