-
Notifications
You must be signed in to change notification settings - Fork 982
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use close event on response instead of socket
In #1880, we switched from using the close event on `req` to close on `req.socket`. This addressed the intended issue but can trigger frequent warnings when keep-alive is used due to a listener being added for each request on the same socket. By using the close event on `res` instead, we address both the issue of event ordering in Node.js >= 16 that the original change was targeting and the event emitter warning leak.
- Loading branch information
1 parent
4d404d4
commit 243580d
Showing
2 changed files
with
123 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters