continue;
}
// OK, we have an http proxy
InetSocketAddress paddr = (InetSocketAddress) p.address();
try {
http = new HttpURLConnection(url, p);
if (connectTimeout >= 0)
http.setConnectTimeout(connectTimeout);
if (readTimeout >= 0)
http.setReadTimeout(readTimeout);
http.connect();
connected = true;
return;
} catch (IOException ioe) {
sel.connectFailed(uri, paddr, ioe);
http = null;
}
}
}
} else { // per connection proxy specified
p = instProxy;
if (p.type() == Proxy.Type.HTTP) {
http = new HttpURLConnection(url, instProxy);
if (connectTimeout >= 0)
http.setConnectTimeout(connectTimeout);
if (readTimeout >= 0)
http.setReadTimeout(readTimeout);
http.connect();