diff options
Diffstat (limited to 'pingora-proxy/src')
-rw-r--r-- | pingora-proxy/src/proxy_h1.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pingora-proxy/src/proxy_h1.rs b/pingora-proxy/src/proxy_h1.rs index 544a74e..e13d4c1 100644 --- a/pingora-proxy/src/proxy_h1.rs +++ b/pingora-proxy/src/proxy_h1.rs @@ -311,7 +311,9 @@ impl<SV> HttpProxy<SV> { }, _ = tx.reserve(), if downstream_state.is_reading() && send_permit.is_err() => { - debug!("waiting for permit {send_permit:?}"); + // If tx is closed, downstream already finish its job. + downstream_state.maybe_finished(tx.is_closed()); + debug!("waiting for permit {send_permit:?}, downstream closed {}", tx.is_closed()); /* No permit, wait on more capacity to avoid starving. * Otherwise this select only blocks on rx, which might send no data * before the entire body is uploaded. |