throw new IllegalStateException("Connection already open");
}
HttpHost target = route.getTargetHost();
HttpHost proxy = route.getProxyHost();
IOSession iosession = entry.getConnection();
if (proxy == null) {
AsyncScheme scheme = getSchemeRegistry(context).getScheme(target);
LayeringStrategy layeringStrategy = scheme.getLayeringStrategy();
if (layeringStrategy != null) {
iosession = layeringStrategy.layer(iosession);
}
}
ClientAsyncConnection conn = this.connFactory.create(
"http-outgoing-" + entry.getId(),
iosession,
params);
iosession.setAttribute(IOEventDispatch.CONNECTION_KEY, conn);
if (proxy == null) {
tracker.connectTarget(conn.getIOSession() instanceof SSLIOSession);
} else {
tracker.connectProxy(proxy, false);