-
Notifications
You must be signed in to change notification settings - Fork 210
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
Fix JmxConnectionFactory.connectAny(..) to loop a second time trying all hosts regardless of past successes/failures #239
Fix JmxConnectionFactory.connectAny(..) to loop a second time trying all hosts regardless of past successes/failures #239
Conversation
26a8235
to
cf4e1b8
Compare
…all hosts regardless of past successes/failures. ref: #239
|
||
for (int i = 0; i < 2; i++) { | ||
while (hostIterator.hasNext()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this iterator was not being "reset" for the second loop, so the second loop never did anything…
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about that bug :D please merge
…all hosts regardless of past successes/failures. ref: #239
cf4e1b8
to
4663b86
Compare
String host = hostIterator.next(); | ||
|
||
for (String host : hostList) { | ||
assert null != host; // @todo remove the null check in the following if condition |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Let's merge
No description provided.