diff options
author | Daniel Stenberg <daniel@haxx.se> | 2003-01-09 14:52:51 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2003-01-09 14:52:51 +0000 |
commit | 6f35ed51dc63ddeeda3a32794b391ba841fe5caa (patch) | |
tree | 19110403e32e720ee16c96559478982211898590 | |
parent | c94ba6631014f76ac91373ea98ff00268dc37f89 (diff) |
This fixed yet another connect problem with the multi interface and ipv4
stack. Kjetil Jacobsen reported and verified the fix.
-rw-r--r-- | lib/connect.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/connect.c b/lib/connect.c index 2c85dc157..d3c65b4dc 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -176,10 +176,9 @@ int waitconnect(int sockfd, /* socket */ /* timeout, no connect today */ return 1; - if(FD_ISSET(sockfd, &errfd)) { + if(FD_ISSET(sockfd, &errfd)) /* error condition caught */ return 2; - } /* we have a connect! */ return 0; @@ -651,6 +650,15 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */ } } + /* The '1 == rc' comes from the waitconnect(), and not from connect(). + We can be sure of this since connect() cannot return 1. */ + if((1 == rc) && (data->state.used_interface == Curl_if_multi)) { + /* Timeout when running the multi interface, we return here with a + CURLE_OK return code. */ + rc = 0; + break; + } + if(0 == rc) { int err = socketerror(sockfd); if ((0 == err) || (EISCONN == err)) { |