In Curl_connecthost(), there's a loop to call singleipconnect() for each address. This loop breaks when it gets a non-bad file descriptor. But, 99% of libcurl invocations use non-blocking sockets, especially in the current era of even the "easy" interface using the "multi" back-end.
This effectively causes singleipconnect() to "succeed" in all but the most catastrophic scenarios. libcurl then runs off with this file descriptor as the connection, even if the connection fails asynchronously. Could we support iterating through IPs in a more useful way even with non-blocking sockets? If not, could there be a flag to force blocking behavior to allow fail-over to occur? -- David Strauss | da...@davidstrauss.net | +1 512 577 5827 [mobile] ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html