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 'aborted' detection on Node v15.5.0+ #1559

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on May 12, 2023

  1. Fix 'aborted' detection on Node v15.5.0+

    This fixes a major memory leak I encountered usign this on Node v16.
    Doing a binary search of node versions, the problem appears to originate in v15.5.0 as a result of nodejs/node#33035, however later changes have quietly completely removed the 'aborted' event that `http-proxy` relies on, and later added a deprecation note about it (which seems to actually be incorrect).
    Despite what the notes about [DEP0156](https://nodejs.org/dist/latest-v16.x/docs/api/deprecations.html#DEP0156) say, the only way I could get this module working reliably again was to replace `req.on('aborted')` with instead checking `res.on('close')` and looking at `res.writeableFinished`.
    Jimbly committed May 12, 2023
    Configuration menu
    Copy the full SHA
    058182a View commit details
    Browse the repository at this point in the history