Skip to content

fix(client): cancel idle interval when pool empties - #292

Draft
lrowe wants to merge 1 commit into
hyperium:masterfrom
lrowe:lrowe-cancel-idle-interval-when-empty
Draft

fix(client): cancel idle interval when pool empties#292
lrowe wants to merge 1 commit into
hyperium:masterfrom
lrowe:lrowe-cancel-idle-interval-when-empty

Conversation

@lrowe

@lrowe lrowe commented Jun 12, 2026

Copy link
Copy Markdown

The IdleTask is started on first connection when pool_idle_timeout is set however it is not stopped when the pool is empty leaving the event loop spinning every pool_idle_timeout ms.

I noticed this in Deno (see: denoland/deno#29444) and the fix seems fairly small. Do you think such a change would be worth considering? Happy to work this up with test cases if so.

@Catwoman08

Copy link
Copy Markdown

This is tied to hyperium/hyper#4100

@Catwoman08
Catwoman08 requested a review from seanmonstar August 17, 2026 18:57
@seanmonstar

Copy link
Copy Markdown
Member

Yea, I think this is worth fixing. And it should "just work", a new connection will see None and start a new timer task. Some sort of unit test would be good to add to the legacy pool module.

@seanmonstar seanmonstar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just needs a test, I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants