Check if eventN is initialized before notifying in Upload web handler (#2435)

This commit is contained in:
Anis Elleuch 2016-08-15 20:15:46 +01:00 committed by Harshavardhana
parent 76d56c6ff2
commit 51d7749c3e

View File

@ -138,7 +138,10 @@ func (en *eventNotifier) RemoveLambdaTarget(lambdaARN string, listenerCh chan []
}
// Returns true if bucket notification is set for the bucket, false otherwise.
func (en eventNotifier) IsBucketNotificationSet(bucket string) bool {
func (en *eventNotifier) IsBucketNotificationSet(bucket string) bool {
if en == nil {
return false
}
en.rwMutex.RLock()
defer en.rwMutex.RUnlock()
_, ok := en.notificationConfigs[bucket]