/**
* @param exclusive - Is connection for the exclusive use of one client?
*/
public void connect(ProxyClient.ProxyTarget proxyTarget, HttpServerExchange exchange, ProxyCallback<ProxyConnection> callback, final long timeout, final TimeUnit timeUnit, boolean exclusive) {
HostThreadData data = getData();
ClientConnection conn = data.availableConnections.poll();
while (conn != null && !conn.isOpen()) {
conn = data.availableConnections.poll();
}
if (conn != null) {
if (exclusive) {
data.connections--;