private void handleClosedConnection(HostThreadData hostData, final ConnectionHolder connection) { openConnections.decrementAndGet(); int connections = --hostData.connections; hostData.availableConnections.remove(connection); if (connections < maxConnections) { CallbackHolder task = hostData.awaitingConnections.poll(); while (task != null && task.isCancelled()) { task = hostData.awaitingConnections.poll(); } if (task != null) { openConnection(task.exchange, task.callback, hostData, false); } } }
openConnection(exchange, callback, data, exclusive); } else {
private void handleClosedConnection(HostThreadData hostData, final ConnectionHolder connection) { openConnections.decrementAndGet(); int connections = --hostData.connections; hostData.availableConnections.remove(connection); if (connections < maxConnections) { CallbackHolder task = hostData.awaitingConnections.poll(); while (task != null && task.isCancelled()) { task = hostData.awaitingConnections.poll(); } if (task != null) { openConnection(task.exchange, task.callback, hostData, false); } } }
private void handleClosedConnection(HostThreadData hostData, final ConnectionHolder connection) { openConnections.decrementAndGet(); int connections = --hostData.connections; hostData.availableConnections.remove(connection); if (connections < maxConnections) { CallbackHolder task = hostData.awaitingConnections.poll(); while (task != null && task.isCancelled()) { task = hostData.awaitingConnections.poll(); } if (task != null) { openConnection(task.exchange, task.callback, hostData, false); } } }
openConnection(exchange, callback, data, exclusive); } else {
openConnection(exchange, callback, data, exclusive); } else {