Skip to content

Commit

Permalink
Fix double-onEgressResumed call
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Jacob Steinebronn authored and facebook-github-bot committed Dec 11, 2024
1 parent 0f9d267 commit c28ac06
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit c28ac06

Please sign in to comment.