[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 236/256: connect: fix race condition with happy eye
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 236/256: connect: fix race condition with happy eyeballs timeout |
Date: |
Fri, 06 Oct 2017 19:45:27 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 49d75a4c15393d66e9f3e0ce289a610da4d6e5a9
Author: Anders Bakken <address@hidden>
AuthorDate: Thu Sep 28 08:20:04 2017 -0700
connect: fix race condition with happy eyeballs timeout
The timer should be started after conn->connecttime is set. Otherwise
the timer could expire without this condition being true:
/* should we try another protocol family? */
if(i == 0 && conn->tempaddr[1] == NULL &&
curlx_tvdiff(now, conn->connecttime) >= HAPPY_EYEBALLS_TIMEOUT) {
Ref: #1928
---
lib/connect.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/connect.c b/lib/connect.c
index 42559f979..b7d10af55 100755
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -1161,7 +1161,6 @@ CURLcode Curl_connecthost(struct connectdata *conn, /*
context */
conn->tempaddr[1] = NULL;
conn->tempsock[0] = CURL_SOCKET_BAD;
conn->tempsock[1] = CURL_SOCKET_BAD;
- Curl_expire(conn->data, HAPPY_EYEBALLS_TIMEOUT, EXPIRE_HAPPY_EYEBALLS);
/* Max time for the next connection attempt */
conn->timeoutms_per_addr =
@@ -1182,6 +1181,7 @@ CURLcode Curl_connecthost(struct connectdata *conn, /*
context */
}
data->info.numconnects++; /* to track the number of connections made */
+ Curl_expire(conn->data, HAPPY_EYEBALLS_TIMEOUT, EXPIRE_HAPPY_EYEBALLS);
return CURLE_OK;
}
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 131/256: mime: use size_t instead of ssize_t in public API interface., (continued)
- [GNUnet-SVN] [gnurl] 131/256: mime: use size_t instead of ssize_t in public API interface., gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 242/256: libcurl-tutorial: describe MIME API and deprecate form API., gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 90/256: version: add the CURL_VERSION_MULTI_SSL feature flag, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 100/256: HELP-US.md: "How to get started helping out in the curl project", gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 157/256: mime: implement encoders., gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 133/256: mime: fix signed/unsigned conversions., gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 140/256: examples/post-callback: stop returning one byte at a time, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 143/256: mime: use CURL_ZERO_TERMINATED in examples, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 46/256: request-target.d: mention added in 7.55.0, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 56/256: winbuild: fix embedded manifest option, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 236/256: connect: fix race condition with happy eyeballs timeout,
gnunet <=
- [GNUnet-SVN] [gnurl] 44/256: makefile.m32: add support for libidn2, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 167/256: vtls: switch to CURL_SHA256_DIGEST_LENGTH define, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 54/256: examples/threaded-ssl: mention that this is for openssl before 1.1, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 188/256: checksrc: detect and warn for multiple spaces, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 233/256: http: add custom empty headers to repeated requests, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 115/256: ossfuzz: moving towards the ideal integration, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 241/256: cookie: fix memory leak if path was set twice in header, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 49/256: test1453: Fixed <features>, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 204/256: curl: make str2udouble not return values on error, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 225/256: symbols-in-versions: fix CURLSSLSET_NO_BACKENDS entry, gnunet, 2017/10/06