cURL / Mailing Lists / curl-library / Single Mail

curl-library

multi-interface and multiple addresses

From: Gisle Vanem <gvanem_at_broadpark.no>
Date: Sun, 13 Jun 2004 15:19:53 +0200

I'm not sure if it was my connect.c patch that broke the mult-interface.
But a modified version of multi-single.c example doesn't work:

  curl_easy_setopt(http_handle, CURLOPT_URL, "http://ubr4-ca5-0-sec.landg1.lb.home.nl");
  curl_easy_setopt(http_handle, CURLOPT_CONNECTTIMEOUT, 10);
  curl_easy_setopt(http_handle, CURLOPT_VERBOSE, 1);

It tries a connect to the 1st host-address. But failing this (timeout), it never
tries the other 6 addresses and gets stuck in WAITCONNECT state.
It exits after 10sec though. Which multi-app.c does not? I don't see the
big difference of those.

I'm a newbie to this multi-interface, so I have just a faith idea on how
to fix this; If 'set.connecttimeout / num_addr' has elapsed while in
CURLM_STATE_WAITCONNECT, shouldn't it try the next address
somehow? My idea is kind of messy, but is to have Curl_is_connected()
return a list of other address to try on failure. Or call Curl_connecthost()
again, but now with the next address. Ideas?

--gv
Received on 2004-06-13