Skip to content

Fix connection event being emitted multiple times per socket in node:http#18295

Merged
Jarred-Sumner merged 1 commit intomainfrom
kai/connection-event-fix
Mar 19, 2025
Merged

Fix connection event being emitted multiple times per socket in node:http#18295
Jarred-Sumner merged 1 commit intomainfrom
kai/connection-event-fix

Conversation

@heimskr
Copy link
Contributor

@heimskr heimskr commented Mar 19, 2025

What does this PR do?

Fixes a bug where node:http servers would emit connection events multiple times for the same socket. This would cause Vite to accumulate excess close listeners on sockets.

  • Documentation or TypeScript types
  • Code changes

How did you verify your code works?

I ran an example Vite app (/examples/web in sroussey/ellmers) and spammed refresh in Firefox while checking for warnings about too many close listeners. I also ran the node:http tests.

@robobun
Copy link
Collaborator

robobun commented Mar 19, 2025

Updated 8:45 PM PT - Mar 18th, 2025

@heimskr, your commit d59817a has 2 failures in Build #13495:


🧪   try this PR locally:

bunx bun-pr 18295

@heimskr heimskr requested a review from Jarred-Sumner March 19, 2025 02:37
@Jarred-Sumner Jarred-Sumner merged commit c863466 into main Mar 19, 2025
69 of 70 checks passed
@Jarred-Sumner Jarred-Sumner deleted the kai/connection-event-fix branch March 19, 2025 04:01
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