Fix listen-bucket (Fixes #2942) (#2949)

Don't close socket while re-initializing notify-listeners, as the rpc
client object is shared between notify-listeners and peer clients.

Also, improves SendRPC() readability by using GetPeerClient().
This commit is contained in:
Aditya Manthramurthy
2016-10-16 20:52:10 -07:00
committed by Harshavardhana
parent 334cdb5d64
commit d02cb963d5
4 changed files with 7 additions and 16 deletions

View File

@@ -210,10 +210,6 @@ func (en *eventNotifier) SetBucketListenerConfig(bucket string, lcfg []listenerC
} else {
en.internal.listenerConfigs[bucket] = lcfg
}
// close all existing loggers and initialize again.
for _, v := range en.internal.targets {
v.lconn.Close()
}
en.internal.targets = make(map[string]*listenerLogger)
for _, lc := range lcfg {
logger, err := newListenerLogger(lc.TopicConfig.TopicARN,