fix: Avoid more crashes due to concurrent map usage (#5912)

This PR fixes another situation where a crash occurs
thanks to @krishnasrinivas for reproducing this

Fixes #5897
This commit is contained in:
Harshavardhana
2018-05-09 15:11:51 -07:00
committed by Dee Koder
parent c525424179
commit 4886bfbc72
8 changed files with 191 additions and 164 deletions
+1 -1
View File
@@ -655,7 +655,7 @@ func (api objectAPIHandlers) DeleteBucketHandler(w http.ResponseWriter, r *http.
globalNotificationSys.RemoveNotification(bucket)
globalPolicySys.Remove(bucket)
for _, nerr := range globalNotificationSys.DeleteBucket(bucket) {
for nerr := range globalNotificationSys.DeleteBucket(bucket) {
logger.GetReqInfo(ctx).AppendTags("remotePeer", nerr.Host.Name)
logger.LogIf(ctx, nerr.Err)
}