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

@@ -55,11 +55,6 @@ func newListenerLogger(listenerArn, targetAddr string) (*listenerLogger, error)
return &listenerLogger{lcLog, lc}, nil
}
func (lc listenerConn) Close() {
// ignore closing errors
_ = lc.Client.Close()
}
// send event to target server via rpc client calls.
func (lc listenerConn) Fire(entry *logrus.Entry) error {
notificationEvent, ok := entry.Data["Records"].([]NotificationEvent)