diff options
Diffstat (limited to 'lib/connect.c')
-rw-r--r-- | lib/connect.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/connect.c b/lib/connect.c index d7add1067..61e45689e 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -448,8 +448,7 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */ return CURLE_COULDNT_CONNECT; } - /* now disable the non-blocking mode again */ - Curl_nonblock(sockfd, FALSE); + /* leave the socket in non-blocking mode */ if(addr) *addr = ai; /* the address we ended up connected to */ @@ -554,9 +553,8 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */ failf(data, "Couldn't connect to host"); return CURLE_COULDNT_CONNECT; } - - /* now disable the non-blocking mode again */ - Curl_nonblock(sockfd, FALSE); + + /* leave the socket in non-blocking mode */ if(addr) /* this is the address we've connected to */ |