Make addition of TopicConfig to globalEventNotifier go-routine safe (#2806)

This commit is contained in:
Krishnan Parthasarathi
2016-09-29 11:16:19 +05:30
committed by Harshavardhana
parent f72163f856
commit 5fdd768903
6 changed files with 174 additions and 138 deletions
+9 -11
View File
@@ -428,17 +428,15 @@ func (web *webAPIHandlers) Upload(w http.ResponseWriter, r *http.Request) {
return
}
if globalEventNotifier.IsBucketNotificationSet(bucket) {
// Notify object created event.
eventNotify(eventData{
Type: ObjectCreatedPut,
Bucket: bucket,
ObjInfo: objInfo,
ReqParams: map[string]string{
"sourceIPAddress": r.RemoteAddr,
},
})
}
// Notify object created event.
eventNotify(eventData{
Type: ObjectCreatedPut,
Bucket: bucket,
ObjInfo: objInfo,
ReqParams: map[string]string{
"sourceIPAddress": r.RemoteAddr,
},
})
}
// Download - file download handler.