mirror of
https://git.vectorsigma.ru/public/k3s.git
synced 2026-07-30 00:49:16 +00:00
move object channel defer close to goroutine
Signed-off-by: Brian Downs <brian.downs@gmail.com>
This commit is contained in:
@@ -1017,12 +1017,13 @@ func (e *ETCD) DeleteSnapshots(ctx context.Context, snapshots []string) error {
|
||||
}
|
||||
|
||||
objectsCh := make(chan minio.ObjectInfo)
|
||||
defer close(objectsCh)
|
||||
|
||||
ctx, cancel := context.WithTimeout(ctx, defaultS3OpTimeout)
|
||||
defer cancel()
|
||||
|
||||
go func() {
|
||||
defer close(objectsCh)
|
||||
|
||||
opts := minio.ListObjectsOptions{
|
||||
Recursive: true,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user