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

http: start connections checking interval on listen #48611

Merged

Conversation

ShogunPanda
Copy link
Contributor

This PR fixes a memory leak by checking HTTP connections only if the server is listening.

Fixes: #48604.

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/http
  • @nodejs/net

@nodejs-github-bot nodejs-github-bot added http Issues or PRs related to the http subsystem. needs-ci PRs that need a full CI run. labels Jun 30, 2023
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@mcollina mcollina added the request-ci Add this label to start a Jenkins CI on a PR. label Jun 30, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 30, 2023
@nodejs-github-bot
Copy link
Collaborator

lib/_http_server.js Outdated Show resolved Hide resolved
lib/_http_server.js Outdated Show resolved Hide resolved
lib/_http_server.js Outdated Show resolved Hide resolved
lib/_http_server.js Outdated Show resolved Hide resolved
lib/_http_server.js Outdated Show resolved Hide resolved
lib/_http_server.js Outdated Show resolved Hide resolved
@ShogunPanda
Copy link
Contributor Author

@lpinca I reworked tests using Countdown. I noticed setInterval was unnecessary.
What about now?

@ShogunPanda ShogunPanda force-pushed the http-server-check-on-listening branch from 3929991 to e86f329 Compare July 3, 2023 11:00
@ShogunPanda ShogunPanda force-pushed the http-server-check-on-listening branch from e86f329 to bbf9f88 Compare July 3, 2023 14:00
@ShogunPanda ShogunPanda added the request-ci Add this label to start a Jenkins CI on a PR. label Jul 4, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jul 4, 2023
@nodejs-github-bot
Copy link
Collaborator

@mcollina mcollina mentioned this pull request Jul 4, 2023
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@ShogunPanda ShogunPanda added commit-queue Add this label to land a pull request using GitHub Actions. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Jul 24, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jul 24, 2023
@nodejs-github-bot nodejs-github-bot merged commit 8490318 into nodejs:main Jul 24, 2023
30 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 8490318

@ShogunPanda ShogunPanda deleted the http-server-check-on-listening branch July 24, 2023 21:26
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Jul 27, 2023
Co-authored-by: Luigi Pinca <luigipinca@gmail.com>
PR-URL: nodejs#48611
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
pluris pushed a commit to pluris/node that referenced this pull request Aug 6, 2023
Co-authored-by: Luigi Pinca <luigipinca@gmail.com>
PR-URL: nodejs#48611
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
pluris pushed a commit to pluris/node that referenced this pull request Aug 7, 2023
Co-authored-by: Luigi Pinca <luigipinca@gmail.com>
PR-URL: nodejs#48611
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
Co-authored-by: Luigi Pinca <luigipinca@gmail.com>
PR-URL: nodejs#48611
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
Co-authored-by: Luigi Pinca <luigipinca@gmail.com>
PR-URL: nodejs#48611
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
UlisesGascon pushed a commit to UlisesGascon/node that referenced this pull request Aug 14, 2023
Co-authored-by: Luigi Pinca <luigipinca@gmail.com>
PR-URL: nodejs#48611
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
RafaelGSS pushed a commit that referenced this pull request Aug 15, 2023
Co-authored-by: Luigi Pinca <luigipinca@gmail.com>
PR-URL: #48611
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
@UlisesGascon UlisesGascon mentioned this pull request Aug 15, 2023
RafaelGSS pushed a commit that referenced this pull request Aug 17, 2023
Co-authored-by: Luigi Pinca <luigipinca@gmail.com>
PR-URL: #48611
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
targos pushed a commit that referenced this pull request Nov 27, 2023
Co-authored-by: Luigi Pinca <luigipinca@gmail.com>
PR-URL: #48611
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
sercher added a commit to sercher/graaljs that referenced this pull request Apr 25, 2024
Co-authored-by: Luigi Pinca <luigipinca@gmail.com>
PR-URL: nodejs/node#48611
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
sercher added a commit to sercher/graaljs that referenced this pull request Apr 25, 2024
Co-authored-by: Luigi Pinca <luigipinca@gmail.com>
PR-URL: nodejs/node#48611
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. http Issues or PRs related to the http subsystem. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

http: memory leak if a server is not closed
9 participants