mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
move object channel defer close to goroutine
Signed-off-by: Brian Downs <brian.downs@gmail.com>
This commit is contained in:
parent
69795277be
commit
8fd180e0d9
@ -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,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user