From ef82da93fb8e8409cb369598a3e22be6c50fb16b Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Mon, 17 Jul 2006 19:22:28 +0000 Subject: "*connected" must be set to FALSE if trynextip() fails. --- lib/connect.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/connect.c b/lib/connect.c index b12cf8b84..a24a12178 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -504,12 +504,13 @@ static bool trynextip(struct connectdata *conn, curl_socket_t sockfd; Curl_addrinfo *ai; - if(sockindex != FIRSTSOCKET) - return TRUE; /* no next */ - /* first close the failed socket */ sclose(conn->sock[sockindex]); conn->sock[sockindex] = CURL_SOCKET_BAD; + *connected = FALSE; + + if(sockindex != FIRSTSOCKET) + return TRUE; /* no next */ /* try the next address */ ai = conn->ip_addr->ai_next; -- cgit v1.2.3