aboutsummaryrefslogtreecommitdiff
path: root/lib/transfer.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/transfer.c
parent7bbac214f5be8ab87114a0e00db2ebd390e1c64b (diff)
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/transfer.c')
-rw-r--r--lib/transfer.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index ee7c37216..8ac91664c 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -1046,6 +1046,11 @@ CURLcode Curl_readwrite(struct connectdata *conn,
else
fd_write = CURL_SOCKET_BAD;
+ if(conn->data->state.drain) {
+ select_res |= CURL_CSELECT_IN;
+ DEBUGF(infof(data, "%s: forcibly told to drain data\n", __func__));
+ }
+
if(!select_res) /* Call for select()/poll() only, if read/write/error
status is not known. */
select_res = Curl_socket_ready(fd_read, fd_write, 0);
@@ -1055,6 +1060,9 @@ CURLcode Curl_readwrite(struct connectdata *conn,
return CURLE_SEND_ERROR;
}
+ DEBUGF(infof(data, "%s: keepon: %x select_res %x\n", __func__, k->keepon,
+ select_res));
+
/* We go ahead and do a read if we have a readable socket or if
the stream was rewound (in which case we have data in a
buffer) */