Skip to content

Use the correct signature for ConnectionFactory.newConnection. #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jaklaassen
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant