mirror of
https://github.com/curl/curl.git
synced 2026-07-30 11:58:53 +03:00
First attempt at making the multi interface work when connecting to a host
that resolves to multiple IP addresses.
This commit is contained in:
parent
964066c0de
commit
6ed5feda2b
2 changed files with 176 additions and 122 deletions
11
lib/multi.c
11
lib/multi.c
|
|
@ -320,7 +320,7 @@ CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles)
|
|||
|
||||
easy=multi->easy.next;
|
||||
while(easy) {
|
||||
#ifdef CURLDEBUG
|
||||
#if 0
|
||||
fprintf(stderr, "HANDLE %p: State: %x\n",
|
||||
(char *)easy, easy->state);
|
||||
#endif
|
||||
|
|
@ -416,8 +416,7 @@ CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles)
|
|||
|
||||
case CURLM_STATE_WAITCONNECT:
|
||||
/* awaiting a completion of an asynch connect */
|
||||
easy->result = Curl_is_connected(easy->easy_conn,
|
||||
easy->easy_conn->sock[FIRSTSOCKET],
|
||||
easy->result = Curl_is_connected(easy->easy_conn, FIRSTSOCKET,
|
||||
&connected);
|
||||
if(connected)
|
||||
easy->result = Curl_protocol_connect(easy->easy_conn);
|
||||
|
|
@ -463,10 +462,8 @@ CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles)
|
|||
/*
|
||||
* First, check if we really are ready to do more.
|
||||
*/
|
||||
easy->result =
|
||||
Curl_is_connected(easy->easy_conn,
|
||||
easy->easy_conn->sock[SECONDARYSOCKET],
|
||||
&connected);
|
||||
easy->result = Curl_is_connected(easy->easy_conn, SECONDARYSOCKET,
|
||||
&connected);
|
||||
if(connected) {
|
||||
/*
|
||||
* When we are connected, DO MORE and then go PERFORM
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue