Skip to content

Commit

Permalink
Changed urlParser size checks:
Browse files Browse the repository at this point in the history
- Since cluster endpoint is no longer included in the urlParser variable,
  all size checks of this variable must decrease by one
  • Loading branch information
Phan committed Jul 25, 2016
1 parent c1259b0 commit bcd734e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -180,7 +180,7 @@ public void reconnectFailedConnection(SearchFilter searchFilter) throws QueryExc
}
}

if (urlParser.getHostAddresses().size() <= 2) {
if (urlParser.getHostAddresses().size() < 2) {
searchFilter = new SearchFilter(true, false);
}
if ((isMasterHostFail() || isSecondaryHostFail())
Expand Down
Expand Up @@ -166,7 +166,7 @@ public static void loop(AuroraListener listener, final List<HostAddress> address
if (searchFilter.isFineIfFoundOnlyMaster() && listener.getUrlParser().getHostAddresses().size() == 1
&& protocol.getHostAddress().equals(listener.getClusterHostAddress())) {
listener.retrieveAllEndpointsAndSet(protocol);
if (listener.getUrlParser().getHostAddresses().size() > 2) {
if (listener.getUrlParser().getHostAddresses().size() > 1) {
searchFilter = new SearchFilter(false);
loopAddresses.addAll(listener.getUrlParser().getHostAddresses());
}
Expand Down

0 comments on commit bcd734e

Please sign in to comment.