[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 19/220: curl: avoid uncessary libcurl timeouts (in
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 19/220: curl: avoid uncessary libcurl timeouts (in parallel mode) |
Date: |
Thu, 12 Sep 2019 17:26:19 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit a2ab576768442f669040837c7f0667e672cf7d48
Author: Daniel Stenberg <address@hidden>
AuthorDate: Mon Jul 29 08:50:25 2019 +0200
curl: avoid uncessary libcurl timeouts (in parallel mode)
When curl_multi_wait() returns OK without file descriptors to wait for,
it might already have done a long timeout.
Closes #4159
---
src/tool_operate.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/tool_operate.c b/src/tool_operate.c
index 68cd11c56..18adf1046 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -1972,14 +1972,17 @@ static CURLcode parallel_transfers(struct GlobalConfig
*global,
while(!done && !mcode && still_running) {
int numfds;
+ struct timeval before = tvnow();
+ long delta;
mcode = curl_multi_wait(multi, NULL, 0, 1000, &numfds);
+ delta = tvdiff(tvnow(), before);
if(!mcode) {
- if(!numfds) {
+ if(!numfds && (delta < 30)) {
long sleep_ms;
- /* If it returns without any filedescriptor instantly, we need to
+ /* If it returns without any file descriptor instantly, we need to
avoid busy-looping during periods where it has nothing particular
to wait for */
curl_multi_timeout(multi, &sleep_ms);
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [GNUnet-SVN] [gnurl] 07/220: docs/PARALLEL-TRANSFERS: correct the version number, (continued)
- [GNUnet-SVN] [gnurl] 07/220: docs/PARALLEL-TRANSFERS: correct the version number, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 01/220: source: remove names from source comments, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 02/220: bump: start working on 7.66.0, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 08/220: curl: remove dead code, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 06/220: docs/PARALLEL-TRANSFERS: added, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 11/220: tool_operate: fix implicit call to easysrc_cleanup, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 17/220: winbuild: add vquic to list of build directories, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 12/220: multi: call detach_connection before Curl_disconnect, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 13/220: ssh-libssh: do not specify O_APPEND when not in append mode, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 20/220: http2_recv: trigger another read when the last data is returned, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 19/220: curl: avoid uncessary libcurl timeouts (in parallel mode),
gnunet <=
- [GNUnet-SVN] [gnurl] 16/220: easy: resize receive buffer on easy handle reset, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 26/220: mailmap: Amit Katyal, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 25/220: asyn-thread: removed unused variable, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 23/220: asyn-thread: create a socketpair to wait on, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 18/220: HTTP: use chunked Transfer-Encoding for HTTP_POST if size unknown, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 24/220: RELEASE-NOTES: synced, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 15/220: examples: Avoid reserved names in hiperfifo examples, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 14/220: RELEASE-NOTES: synced, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 21/220: progress: reset download/uploaded counter, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 22/220: curl: cap the maximum allowed values for retry time arguments, gnunet, 2019/09/12