summaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2015-04-30 08:20:49 +0200
committerDaniel Stenberg <daniel@haxx.se>2015-05-18 08:57:17 +0200
commit01e1bdb10ce613d4a94fc618819156fc61d2f419 (patch)
treec62b9d5d854f89198b45d9a31125c7c24e62fb24 /lib/url.c
parent7bbac214f5be8ab87114a0e00db2ebd390e1c64b (diff)
downloadcurl-01e1bdb10ce613d4a94fc618819156fc61d2f419.tar.gz
http2: force "drainage" of streams
... which is necessary since the socket won't be readable but there is data waiting in the buffer.
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/url.c b/lib/url.c
index 49b55d89d..688dd9ea0 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -2892,6 +2892,16 @@ void Curl_getoff_all_pipelines(struct SessionHandle *data,
conn->readchannel_inuse = FALSE;
if(Curl_removeHandleFromPipeline(data, conn->send_pipe) && send_head)
conn->writechannel_inuse = FALSE;
+
+ if(conn->httpversion == 20) {
+ /* delete this handle from the stream hash */
+ struct HTTP *stream = data->req.protop;
+ if(stream && Curl_hash_delete(&conn->proto.httpc.streamsh,
+ &stream->stream_id,
+ sizeof(stream->stream_id))) {
+ infof(conn->data, "Failed to remove handle from h2 stream hash!!\n");
+ }
+ }
}
static void signalPipeClose(struct curl_llist *pipeline, bool pipe_broke)
@@ -5955,10 +5965,12 @@ CURLcode Curl_done(struct connectdata **connp,
if((conn->send_pipe->size + conn->recv_pipe->size != 0 &&
!data->set.reuse_forbid &&
- !conn->bits.close))
+ !conn->bits.close)) {
/* Stop if pipeline is not empty and we do not have to close
connection. */
+ DEBUGF(infof(data, "Connection still in use, no more Curl_done now!\n"));
return CURLE_OK;
+ }
conn->bits.done = TRUE; /* called just now! */