From c28ac0608f04fff7fb178fbfe54e8e8192787a48 Mon Sep 17 00:00:00 2001 From: Jacob Steinebronn Date: Tue, 10 Dec 2024 18:27:19 -0800 Subject: [PATCH] Fix double-`onEgressResumed` call Summary: If two body events are present and queued, when the first one resolves, it calls `resumeClientIngress`, which results in any queued calls happening inline. This then results in the same call to `resumeClientIngress`, since from the HTTPTunnelSink's perspective, it hasn't run `handlerEgressPaused_ = false;` yet so thinks it still needs to pause ingress Differential Revision: D67065077 fbshipit-source-id: abf23c74c76b7dd3e55ce71c03a8222d567f4286 --- .../proxygen/src/proxygen/lib/http/sink/HTTPTunnelSink.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third-party/proxygen/src/proxygen/lib/http/sink/HTTPTunnelSink.cpp b/third-party/proxygen/src/proxygen/lib/http/sink/HTTPTunnelSink.cpp index c6c93dce439b7d..b16cd0560b8869 100644 --- a/third-party/proxygen/src/proxygen/lib/http/sink/HTTPTunnelSink.cpp +++ b/third-party/proxygen/src/proxygen/lib/http/sink/HTTPTunnelSink.cpp @@ -169,8 +169,8 @@ void HTTPTunnelSink::writeSuccess() noexcept { // If we drop below the max outstanding writes, resume egress if (outstandingWrites_ < kMaxOutstandingWrites && handlerEgressPaused_ && handler_) { - handler_->onEgressResumed(); handlerEgressPaused_ = false; + handler_->onEgressResumed(); } resetIdleTimeout(); }