http: fix http server connection list when close

PR-URL: https://github.com/nodejs/node/pull/43949
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Feng Yu <F3n67u@outlook.com>
This commit is contained in:
theanarkh
2022-07-24 22:06:24 +08:00
committed by GitHub
parent 050d974a25
commit da3949cfd7
3 changed files with 58 additions and 5 deletions

View File

@@ -182,6 +182,7 @@ function freeParser(parser, req, socket) {
if (parser._consumed)
parser.unconsume();
cleanParser(parser);
parser.remove();
if (parsers.free(parser) === false) {
// Make sure the parser's stack has unwound before deleting the
// corresponding C++ object through .close().