-
Notifications
You must be signed in to change notification settings - Fork 30k
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: remove reference to onParserExecute #4773
Conversation
Parsers hold a reference to the socket associated with the request through onParserExecute. This must be removed when the parser is freed so that the socket can be garbage collected when destroyed.
/cc @indutny |
LGTM. For mechanical sympathy it might be good to also null the property in the freelist factory function on line 231 in |
LGTM + what @bnoordhuis said |
LGTM |
@Nibbler999 thanks for finding this fix! As mentioned in #4779, this seems to be of help tested against MacOS NodeJS. While looking through this patch, along other comments I found lines 182 to be somewhat interesting too :) // TODO: All parser data should be attached to a
// single object, so that it can be easily cleaned
// up by doing `parser.data = {}`, which should
// be done in FreeList.free. `parsers.free(parser)`
// should be all that is needed. |
Parsers hold a reference to the socket associated with the request through onParserExecute. This must be removed when the parser is freed so that the socket can be garbage collected when destroyed. Regression introduced in commit 59b91f1 ("http_parser: consume StreamBase instance"). PR-URL: #4773 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Brian White <[email protected]> Reviewed-By: Fedor Indutny <[email protected]>
Landed in 5f6dfab, thanks. Tagging for v5.x and LTS. |
Parsers hold a reference to the socket associated with the request through onParserExecute. This must be removed when the parser is freed so that the socket can be garbage collected when destroyed. Regression introduced in commit 59b91f1 ("http_parser: consume StreamBase instance"). PR-URL: #4773 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Brian White <[email protected]> Reviewed-By: Fedor Indutny <[email protected]>
this must land with #4337 |
Parsers hold a reference to the socket associated with the request through onParserExecute. This must be removed when the parser is freed so that the socket can be garbage collected when destroyed. Regression introduced in commit 59b91f1 ("http_parser: consume StreamBase instance"). PR-URL: #4773 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Brian White <[email protected]> Reviewed-By: Fedor Indutny <[email protected]>
Parsers hold a reference to the socket associated with the request through onParserExecute. This must be removed when the parser is freed so that the socket can be garbage collected when destroyed. Regression introduced in commit 59b91f1 ("http_parser: consume StreamBase instance"). PR-URL: #4773 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Brian White <[email protected]> Reviewed-By: Fedor Indutny <[email protected]>
Parsers hold a reference to the socket associated with the request through onParserExecute. This must be removed when the parser is freed so that the socket can be garbage collected when destroyed. Regression introduced in commit 59b91f1 ("http_parser: consume StreamBase instance"). PR-URL: #4773 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Brian White <[email protected]> Reviewed-By: Fedor Indutny <[email protected]>
Parsers hold a reference to the socket associated with the request through onParserExecute. This must be removed when the parser is freed so that the socket can be garbage collected when destroyed. Regression introduced in commit 59b91f1 ("http_parser: consume StreamBase instance"). PR-URL: nodejs#4773 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Brian White <[email protected]> Reviewed-By: Fedor Indutny <[email protected]>
Parsers hold a reference to the socket associated with the request
through onParserExecute. This must be removed when the parser is
freed so that the socket can be garbage collected when destroyed.
Not removing this causes the last 1000 sockets used for inbound http requests to go uncollected after being destroyed.
Code was introduced in 59b91f1.