Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use close event on response instead of socket #1892

Merged
merged 1 commit into from Feb 9, 2022

Commits on Jan 31, 2022

  1. 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.
    josephharrington committed Jan 31, 2022
    Copy the full SHA
    243580d View commit details
    Browse the repository at this point in the history