fastly / pushpin

A proxy server for adding push to your API, used at the core of Fastly's Fanout service
https://pushpin.org
Apache License 2.0
3.66k stars 153 forks source link

httpsession: cancel other activities when closing #48066

Closed jkarneges closed 2 months ago

jkarneges commented 2 months ago

This fixes a possible assert after failing to apply filters in tryProcessOutReq. When filtering fails, the state is set to Closing but the outbound request is left alive, and any activity from the outbound request while in that state is unexpected behavior. In general, we don't want concurrent operations going on while we are closing, so to avoid this problem and potentially similar problems we'll ensure other activities are canceled first.