@ -20,7 +20,6 @@ import (
"bytes"
"bytes"
"context"
"context"
"io"
"io"
"strings"
"github.com/klauspost/reedsolomon"
"github.com/klauspost/reedsolomon"
"github.com/minio/minio/cmd/logger"
"github.com/minio/minio/cmd/logger"
@ -82,7 +81,9 @@ func writeDataBlocks(ctx context.Context, dst io.Writer, enBlocks [][]byte, data
if write < int64 ( len ( block ) ) {
if write < int64 ( len ( block ) ) {
n , err := io . Copy ( dst , bytes . NewReader ( block [ : write ] ) )
n , err := io . Copy ( dst , bytes . NewReader ( block [ : write ] ) )
if err != nil {
if err != nil {
logger . LogIf ( ctx , err )
if err != io . ErrClosedPipe {
logger . LogIf ( ctx , err )
}
return 0 , err
return 0 , err
}
}
totalWritten += n
totalWritten += n
@ -92,7 +93,7 @@ func writeDataBlocks(ctx context.Context, dst io.Writer, enBlocks [][]byte, data
n , err := io . Copy ( dst , bytes . NewReader ( block ) )
n , err := io . Copy ( dst , bytes . NewReader ( block ) )
if err != nil {
if err != nil {
// The writer will be closed incase of range queries, which will emit ErrClosedPipe.
// The writer will be closed incase of range queries, which will emit ErrClosedPipe.
if ! strings . Contains ( err . Error ( ) , "read/write on closed pipe" ) {
if err != io . ErrClosedPipe {
logger . LogIf ( ctx , err )
logger . LogIf ( ctx , err )
}
}
return 0 , err
return 0 , err