aboutsummaryrefslogtreecommitdiff
path: root/lib/multi.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2006-10-06 21:19:57 +0000
committerDaniel Stenberg <daniel@haxx.se>2006-10-06 21:19:57 +0000
commitbefc30bc55cebe958d652ec4f5d31aa8565773c1 (patch)
treeb372a9b0cadadba5e0f54d3db2bac8113810eeee /lib/multi.c
parentca5846cde95097d6a3436474ed641a96158b46e3 (diff)
Bogdan Nicula's hanging test case was converted to test case 533 and the test
now runs fine.
Diffstat (limited to 'lib/multi.c')
-rw-r--r--lib/multi.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/multi.c b/lib/multi.c
index 46fd255f3..620c08277 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -942,9 +942,14 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
case CURLM_STATE_WAITDO:
/* Wait for our turn to DO when we're pipelining requests */
- infof(easy->easy_handle, "Connection #%d: send pipe size = %d\n",
+#ifdef CURLDEBUG
+ infof(easy->easy_handle, "Conn %d send pipe %d inuse %d athead %d\n",
easy->easy_conn->connectindex,
- easy->easy_conn->send_pipe->size);
+ easy->easy_conn->send_pipe->size,
+ easy->easy_conn->writechannel_inuse,
+ Curl_isHandleAtHead(easy->easy_handle,
+ easy->easy_conn->send_pipe));
+#endif
if (!easy->easy_conn->writechannel_inuse &&
Curl_isHandleAtHead(easy->easy_handle,
easy->easy_conn->send_pipe)) {
@@ -1232,6 +1237,11 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
* If an error was returned, and we aren't in completed state now,
* then we go to completed and consider this transfer aborted.
*/
+ if(easy->easy_conn) {
+ /* if this has a connection, unsubscribe from the pipelines */
+ easy->easy_conn->writechannel_inuse = FALSE;
+ easy->easy_conn->readchannel_inuse = FALSE;
+ }
multistate(easy, CURLM_STATE_COMPLETED);
}
}
@@ -1345,7 +1355,6 @@ CURLMcode curl_multi_cleanup(CURLM *multi_handle)
Curl_hash_destroy(multi->hostcache);
Curl_hash_destroy(multi->sockhash);
-#if 1
/* go over all connections that have close actions */
for(i=0; i< multi->connc->num; i++) {
if(multi->connc->connects[i] &&
@@ -1367,7 +1376,6 @@ CURLMcode curl_multi_cleanup(CURLM *multi_handle)
free(cl);
cl= n;
}
-#endif
Curl_rm_connc(multi->connc);