mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
Added 'close' to results channel in Walk() (#9956)
This commit is contained in:
parent
174f428571
commit
648cb13e02
@ -60,6 +60,10 @@ func (l *GatewayLocker) NewNSLock(ctx context.Context, bucket string, objects ..
|
||||
func (l *GatewayLocker) Walk(ctx context.Context, bucket, prefix string, results chan<- ObjectInfo) error {
|
||||
walk := func(ctx context.Context, bucket, prefix string, results chan<- ObjectInfo) error {
|
||||
var marker string
|
||||
|
||||
// Make sure the results channel is ready to be read when we're done.
|
||||
defer close(results)
|
||||
|
||||
for {
|
||||
// set maxKeys to '0' to list maximum possible objects in single call.
|
||||
loi, err := l.ObjectLayer.ListObjects(ctx, bucket, prefix, marker, "", 0)
|
||||
|
Loading…
Reference in New Issue
Block a user