aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/vquic/ngtcp2.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/vquic/ngtcp2.c b/lib/vquic/ngtcp2.c
index c26e80670..38bea4520 100644
--- a/lib/vquic/ngtcp2.c
+++ b/lib/vquic/ngtcp2.c
@@ -1217,12 +1217,16 @@ static int cb_h3_stream_close(nghttp3_conn *conn, int64_t stream_id,
uint64_t app_error_code, void *user_data,
void *stream_user_data)
{
+ struct Curl_easy *data = stream_user_data;
+ struct HTTP *stream = data->req.protop;
(void)conn;
(void)stream_id;
(void)app_error_code;
(void)user_data;
- (void)stream_user_data;
fprintf(stderr, "cb_h3_stream_close CALLED\n");
+
+ stream->closed = TRUE;
+
return 0;
}
@@ -1481,6 +1485,11 @@ static ssize_t ngh3_stream_recv(struct connectdata *conn,
return stream->memlen;
}
+ if(stream->closed) {
+ *curlcode = CURLE_OK;
+ return 0;
+ }
+
infof(conn->data, "ngh3_stream_recv returns 0 bytes and EAGAIN\n");
*curlcode = CURLE_AGAIN;
return -1;