mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
cache: do not evict entry on ErrClosedPipe (#8432)
Fixes: #8431. If client prematurely closes the read end of the pipe, cache entry should not be evicted.
This commit is contained in:
parent
40fcd3dc48
commit
f01d53b20f
@ -583,8 +583,9 @@ func (c *diskCache) bitrotReadFromCache(ctx context.Context, filePath string, of
|
||||
if _, err := io.Copy(writer, bytes.NewReader((*bufp)[blockOffset:blockOffset+blockLength])); err != nil {
|
||||
if err != io.ErrClosedPipe {
|
||||
logger.LogIf(ctx, err)
|
||||
return err
|
||||
}
|
||||
return err
|
||||
eof = true
|
||||
}
|
||||
if eof {
|
||||
break
|
||||
|
Loading…
Reference in New Issue
Block a user