yesodweb / wai

Haskell Web Application Interface
MIT License
834 stars 263 forks source link

Eagerly remove `Handle`s from the manager #986

Closed FinleyMcIlwaine closed 7 months ago

FinleyMcIlwaine commented 7 months ago

This PR is based on #985. That should be merged first, then this can be rebased on main and merged.

Previously, if many streams were opened on a connection with a very long timeout, the handles would accumulate. This PR causes the handles to be removed from the manager immediately upon cancel, instead of relying on timeouts causing the reaper to remove them.

Before submitting your PR, check that you've:

After submitting your PR:

kazu-yamamoto commented 7 months ago

Rebased and merged. Thank you for your contribution!