mirror of https://github.com/k3s-io/k3s
move object channel defer close to goroutine
Signed-off-by: Brian Downs <brian.downs@gmail.com>pull/3354/head
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