aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrister Johansen <johansen@opensolaris.org>2010-06-17 15:46:27 +0200
committerDaniel Stenberg <daniel@haxx.se>2010-06-17 15:46:27 +0200
commit43edcc4a2eb0aa1dec888cad7b2a66b3a4948026 (patch)
treefd496be821e4c34c4929f3a1d4e9a7ab6aa733d4
parent01c2b397aa58a8727f3b12ca0808dc602fc4901e (diff)
multi: unmark handle as used when no longer head of pipeline
-rw-r--r--lib/multi.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/multi.c b/lib/multi.c
index af1db606c..b42f68d0f 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -2169,7 +2169,9 @@ static CURLcode addHandleToSendOrPendPipeline(struct SessionHandle *handle,
struct connectdata *conn)
{
size_t pipeLen = conn->send_pipe->size + conn->recv_pipe->size;
+ struct curl_llist_element *sendhead = conn->send_pipe->head;
struct curl_llist *pipeline;
+ CURLcode rc;
if(!Curl_isPipeliningEnabled(handle) ||
pipeLen == 0)
@@ -2182,7 +2184,17 @@ static CURLcode addHandleToSendOrPendPipeline(struct SessionHandle *handle,
pipeline = conn->pend_pipe;
}
- return Curl_addHandleToPipeline(handle, pipeline);
+ rc = Curl_addHandleToPipeline(handle, pipeline);
+
+ if (pipeline == conn->send_pipe && sendhead != conn->send_pipe->head) {
+ /* this is a new one as head, expire it */
+ conn->writechannel_inuse = FALSE; /* not in use yet */
+ infof(conn->data, "%p is at send pipe head!\n",
+ conn->send_pipe->head->ptr);
+ Curl_expire(conn->send_pipe->head->ptr, 1);
+ }
+
+ return rc;
}
static int checkPendPipeline(struct connectdata *conn)