hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 董玉冰 Tom Yubing Dong <tom.tung....@gmail.com>
Subject When using ProxySelectorRoutePlanner with DefaultHttpClient, will ProxySelector.connectFailed() get called?
Date Fri, 13 Apr 2012 12:43:18 GMT

I have implemented my own ProxySelector, so that when connection
fails, connectFailed is called and the proxy can be suspended or
removed from the list.

I used my ProxySelector implementation to construct a
ProxySelectorRoutePlanner, and set it to be the RoutePlanner of a

I let ProxySelector.select return an invalid proxy (like
"localhost:1234"). When I call HttpClient.execute, a
HttpHostConnectException("Connection to
refused") is thrown as expected, but ProxySelector.connectFailed never
get called.

I wish to ask what else do I need to do? Do I need to implement a
HttpRequestRetryHandler that calls ProxySelector.connectFailed?


Tom Dong

To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org

View raw message