mirror of
https://github.com/minio/minio.git
synced 2024-12-26 07:05:55 -05:00
remove queue only if index is within the range (#9341)
Fixes minio/mc#3155
This commit is contained in:
parent
9054ce73b2
commit
525287f4b6
@ -116,7 +116,7 @@ func (api objectAPIHandlers) GetBucketNotificationHandler(w http.ResponseWriter,
|
|||||||
// With newer config disallowing changing / turning off
|
// With newer config disallowing changing / turning off
|
||||||
// notification targets without removing ARN in notification
|
// notification targets without removing ARN in notification
|
||||||
// configuration we won't see this problem anymore.
|
// configuration we won't see this problem anymore.
|
||||||
if reflect.DeepEqual(queue.ARN, arnErr.ARN) {
|
if reflect.DeepEqual(queue.ARN, arnErr.ARN) && i < len(config.QueueList) {
|
||||||
config.QueueList = append(config.QueueList[:i],
|
config.QueueList = append(config.QueueList[:i],
|
||||||
config.QueueList[i+1:]...)
|
config.QueueList[i+1:]...)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user