summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Eissing <stefan@eissing.org>2023-04-13 12:04:27 +0200
committerDaniel Stenberg <daniel@haxx.se>2023-04-13 23:54:43 +0200
commit43d7ccd03dbb966db2ace7c02adf2846b9845007 (patch)
treeb0fa959d8760064fe70c232b08288c1617b9a353
parentbe800a6cabe5c3e8968549b3481ddc5d73f12721 (diff)
downloadcurl-43d7ccd03dbb966db2ace7c02adf2846b9845007.tar.gz
cf-h2-proxy: fix processing ingress to stop too early
- progress ingress stopped too early, causing data from the underlying filters to not be processed and report that no tunnel data was available - this lead to "hangers" where no socket activity was seen but data rested in buffers Closes #10952
-rw-r--r--lib/cf-h2-proxy.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/cf-h2-proxy.c b/lib/cf-h2-proxy.c
index e39d32575..d2c0ef265 100644
--- a/lib/cf-h2-proxy.c
+++ b/lib/cf-h2-proxy.c
@@ -439,7 +439,6 @@ static CURLcode h2_progress_ingress(struct Curl_cfilter *cf,
struct cf_h2_proxy_ctx *ctx = cf->ctx;
CURLcode result = CURLE_OK;
ssize_t nread;
- bool keep_reading = TRUE;
/* Process network input buffer fist */
if(!Curl_bufq_is_empty(&ctx->inbufq)) {
@@ -451,8 +450,7 @@ static CURLcode h2_progress_ingress(struct Curl_cfilter *cf,
/* Receive data from the "lower" filters, e.g. network until
* it is time to stop or we have enough data for this stream */
- while(keep_reading &&
- !ctx->conn_closed && /* not closed the connection */
+ while(!ctx->conn_closed && /* not closed the connection */
!ctx->tunnel.closed && /* nor the tunnel */
Curl_bufq_is_empty(&ctx->inbufq) && /* and we consumed our input */
!Curl_bufq_is_full(&ctx->tunnel.recvbuf)) {
@@ -472,7 +470,6 @@ static CURLcode h2_progress_ingress(struct Curl_cfilter *cf,
break;
}
- keep_reading = Curl_bufq_is_full(&ctx->inbufq);
if(h2_process_pending_input(cf, data, &result))
return result;
}