Unverified Commit e45dea3b authored by Hussein Galal's avatar Hussein Galal Committed by GitHub

Fix delete issue for etcd s3 snapshots (#3647)

parent cd6e3ccd
...@@ -1017,12 +1017,13 @@ func (e *ETCD) DeleteSnapshots(ctx context.Context, snapshots []string) error { ...@@ -1017,12 +1017,13 @@ func (e *ETCD) DeleteSnapshots(ctx context.Context, snapshots []string) error {
} }
objectsCh := make(chan minio.ObjectInfo) objectsCh := make(chan minio.ObjectInfo)
defer close(objectsCh)
ctx, cancel := context.WithTimeout(ctx, defaultS3OpTimeout) ctx, cancel := context.WithTimeout(ctx, defaultS3OpTimeout)
defer cancel() defer cancel()
go func() { go func() {
defer close(objectsCh)
opts := minio.ListObjectsOptions{ opts := minio.ListObjectsOptions{
Recursive: true, Recursive: true,
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment