Skip to content

Commit

Permalink
handle cases when address is null when discovering
Browse files Browse the repository at this point in the history
  • Loading branch information
kimchy committed Oct 9, 2010
1 parent 7df3b5c commit 05e413a
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,12 @@ private static enum HostType {
break;
}
for (int port : new PortsRange(ports).ports()) {
logger.trace("adding {}, address {}", instance.getInstanceId(), address);
discoNodes.add(new DiscoveryNode("#cloud-" + instance.getInstanceId() + "-" + port, new InetSocketTransportAddress(address, port)));
if (address != null) {
logger.trace("adding {}, address {}", instance.getInstanceId(), address);
discoNodes.add(new DiscoveryNode("#cloud-" + instance.getInstanceId() + "-" + port, new InetSocketTransportAddress(address, port)));
} else {
logger.trace("not adding {}, address is null, host_type {}", instance.getInstanceId(), hostType);
}
}
}
}
Expand Down

0 comments on commit 05e413a

Please sign in to comment.