Skip to content

Commit

Permalink
Merge pull request #30 from nicolasmoreau/dev
Browse files Browse the repository at this point in the history
bug correction : when there is only one node responding
  • Loading branch information
nicolasmoreau committed Aug 12, 2015
2 parents 06924c2 + bfee270 commit cd3cfdd
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,14 +175,18 @@ public void completeEvent(){
this.completeEventCalled=true;
List<HttpHeadResponse> results = getNodes();
int numActive=0;
String nodeId = null;


for (HttpHeadResponse node:results){

if (node.isOk() && node.getStatus()==Response.OK)
if (node.isOk() && node.getStatus()==Response.OK){
nodeId = node.getIvoaID();
numActive++;
}
}

if (numActive==1){
consumers.updateNodeIds(nodeId);
consumers.getQueries().put(results.get(0).getFullQueryURL(), true);
}

Expand Down

0 comments on commit cd3cfdd

Please sign in to comment.