summaryrefslogtreecommitdiff
path: root/lib/vquic/quiche.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-09-26 15:45:58 +0200
committerDaniel Stenberg <daniel@haxx.se>2019-09-26 15:45:58 +0200
commit2377465901f74f8ad5160bbd55845911fa5ae8c3 (patch)
tree468aea0725d7f8ae02fe2ebccd927f01dcfc1fca /lib/vquic/quiche.c
parentea7744a07ebd957eccb9a867eee0c3e3d67efff5 (diff)
downloadcurl-2377465901f74f8ad5160bbd55845911fa5ae8c3.tar.gz
quiche: set 'drain' when returning without having drained the queues
Diffstat (limited to 'lib/vquic/quiche.c')
-rw-r--r--lib/vquic/quiche.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/vquic/quiche.c b/lib/vquic/quiche.c
index e8f80217b..7924ea55b 100644
--- a/lib/vquic/quiche.c
+++ b/lib/vquic/quiche.c
@@ -404,13 +404,14 @@ static ssize_t h3_stream_recv(struct connectdata *conn,
quiche_h3_event *ev;
int rc;
struct h3h1header headers;
- struct HTTP *stream = conn->data->req.protop;
+ struct Curl_easy *data = conn->data;
+ struct HTTP *stream = data->req.protop;
headers.dest = buf;
headers.destlen = buffersize;
headers.nlen = 0;
if(process_ingress(conn, sockfd, qs)) {
- infof(conn->data, "h3_stream_recv returns on ingress\n");
+ infof(data, "h3_stream_recv returns on ingress\n");
*curlcode = CURLE_RECV_ERROR;
return -1;
}
@@ -423,7 +424,7 @@ static ssize_t h3_stream_recv(struct connectdata *conn,
if(s != stream->stream3_id) {
/* another transfer, ignore for now */
- infof(conn->data, "Got h3 for stream %u, expects %u\n",
+ infof(data, "Got h3 for stream %u, expects %u\n",
s, stream->stream3_id);
continue;
}
@@ -477,7 +478,9 @@ static ssize_t h3_stream_recv(struct connectdata *conn,
*curlcode = (-1 == recvd)? CURLE_AGAIN : CURLE_OK;
if(recvd >= 0)
/* Get this called again to drain the event queue */
- Curl_expire(conn->data, 0, EXPIRE_QUIC);
+ Curl_expire(data, 0, EXPIRE_QUIC);
+
+ data->state.drain = (recvd >= 0) ? 1 : 0;
return recvd;
}