mirror of
https://github.com/minio/minio.git
synced 2025-11-08 21:24:55 -05:00
do not block on send channels under high load (#19090)
all send channels must compete with `ctx` if not they will perpetually stay alive.
This commit is contained in:
@@ -219,7 +219,10 @@ func (o *listPathOptions) gatherResults(ctx context.Context, in <-chan metaCache
|
||||
// Do not return io.EOF
|
||||
if resCh != nil {
|
||||
resErr = nil
|
||||
resCh <- results
|
||||
select {
|
||||
case resCh <- results:
|
||||
case <-ctx.Done():
|
||||
}
|
||||
resCh = nil
|
||||
returned = true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user