summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2014-03-18 08:56:13 +0100
committerDaniel Stenberg <daniel@haxx.se>2014-03-19 16:34:12 +0100
commit930b81387b8e343b35ebbefb521b237bc0018707 (patch)
treec4ce5e103c6124ee94db496a2a70e0fc38d593ba
parentec0079a99daba23c2757ee0cab716abf62a159cd (diff)
downloadgnurl-930b81387b8e343b35ebbefb521b237bc0018707.tar.gz
gnurl-930b81387b8e343b35ebbefb521b237bc0018707.tar.bz2
gnurl-930b81387b8e343b35ebbefb521b237bc0018707.zip
trynextip: don't store 'ai' on failed connects...
It leads to the "next family" tries starting from the wrong point and thus fails! Bug: http://curl.haxx.se/bug/view.cgi?id=1337 Reported-by: ricker
-rw-r--r--lib/connect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/connect.c b/lib/connect.c
index 5a376c34a..90283fe85 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -570,11 +570,11 @@ static CURLcode trynextip(struct connectdata *conn,
if(ai) {
rc = singleipconnect(conn, ai, &conn->tempsock[tempindex]);
- conn->tempaddr[tempindex] = ai;
if(rc == CURLE_COULDNT_CONNECT) {
ai = ai->ai_next;
continue;
}
+ conn->tempaddr[tempindex] = ai;
}
break;
}