Hi,

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
DefaultHttpClient.

I let ProxySelector.select return an invalid proxy (like
"localhost:1234"). When I call HttpClient.execute, a
HttpHostConnectException("Connection to http://127.0.0.1:1234
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?

Thanks!

---
Cheers,
Tom Dong

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to