rabbitmq-ha-client icon indicating copy to clipboard operation
rabbitmq-ha-client copied to clipboard

Use the correct signature for ConnectionFactory.newConnection.

Open jaklaassen opened this issue 12 years ago • 0 comments

HaConnectionFactory is overriding and calling newConnection(Address[] addrs), which is not the root method in the super class and is causing incorrect behavior.

In the case of the override, it requires that client implementations call newConnection with addrs, and it doesn't support the default value provided by the ConnectionFactory. In the second case (in newTargetConnection), the superclass implementation calls the overridden method in HaConnectionFactory, which is causing multiple shutdown listeners to be created on the first reconnect and multiple connections on the second reconnect.

jaklaassen avatar Jul 01 '13 03:07 jaklaassen