CLOUDSTACK-8387 - Close mgmt server peer socket on failure, without relying on autoclose

This commit is contained in:
MS 2015-04-15 09:49:48 -07:00 committed by Marcus Sorensen
parent aab0bfc809
commit 42a8253993

View File

@ -498,7 +498,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust
} catch (UnknownHostException e) {
throw new CloudRuntimeException("Unable to resolve " + ip);
}
SocketChannel ch1;
SocketChannel ch1 = null;
try {
ch1 = SocketChannel.open(new InetSocketAddress(addr, Port.value()));
ch1.configureBlocking(true); // make sure we are working at blocking mode