mirror of
https://github.com/curl/curl.git
synced 2026-08-24 15:23:36 +03:00
http2: force "drainage" of streams
... which is necessary since the socket won't be readable but there is data waiting in the buffer.
This commit is contained in:
parent
7bbac214f5
commit
01e1bdb10c
7 changed files with 123 additions and 57 deletions
|
|
@ -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) */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue