prevCh.close();
} catch (Exception e) {
}
}
if (ch == null || ch == prevCh) {
ManagementServerHost ms = _clusterMgr.getPeer(peerName);
if (ms == null) {
s_logger.info("Unable to find peer: " + peerName);
return null;
}
String ip = ms.getServiceIP();
InetAddress addr;
try {
addr = InetAddress.getByName(ip);
} catch (UnknownHostException e) {
throw new CloudRuntimeException("Unable to resolve " + ip);