aboutsummaryrefslogtreecommitdiff
path: root/lib/pipeline.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2016-08-02 10:57:30 +0200
committerDaniel Stenberg <daniel@haxx.se>2016-08-04 00:26:01 +0200
commitbde2f09d5e4c4a3b2826aefdda0a10c07bbb551a (patch)
treed547dda6be69a0740afb2c8939ade8a2d3c3d7df /lib/pipeline.c
parent6eb60c2dc589a15ff8a3aa5961745d86044a9b78 (diff)
multi: make Curl_expire() work with 0 ms timeouts
Previously, passing a timeout of zero to Curl_expire() was a magic code for clearing all timeouts for the handle. That is now instead made with the new Curl_expire_clear() function and thus a 0 timeout is fine to set and will trigger a timeout ASAP. This will help removing short delays, in particular notable when doing HTTP/2.
Diffstat (limited to 'lib/pipeline.c')
-rw-r--r--lib/pipeline.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/pipeline.c b/lib/pipeline.c
index 0ff82f086..bd902d9a3 100644
--- a/lib/pipeline.c
+++ b/lib/pipeline.c
@@ -6,7 +6,7 @@
* \___|\___/|_| \_\_____|
*
* Copyright (C) 2013, Linus Nielsen Feltzing, <linus@haxx.se>
- * Copyright (C) 2013-2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2013-2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -114,7 +114,7 @@ CURLcode Curl_add_handle_to_pipeline(struct Curl_easy *handle,
if(pipeline == conn->send_pipe && sendhead != conn->send_pipe->head) {
/* this is a new one as head, expire it */
Curl_pipeline_leave_write(conn); /* not in use yet */
- Curl_expire(conn->send_pipe->head->ptr, 1);
+ Curl_expire(conn->send_pipe->head->ptr, 0);
}
#if 0 /* enable for pipeline debugging */
@@ -149,7 +149,7 @@ void Curl_move_handle_from_send_to_recv_pipe(struct Curl_easy *handle,
infof(conn->data, "%p is at send pipe head B!\n",
(void *)conn->send_pipe->head->ptr);
#endif
- Curl_expire(conn->send_pipe->head->ptr, 1);
+ Curl_expire(conn->send_pipe->head->ptr, 0);
}
/* The receiver's list is not really interesting here since either this