Skip to content

http.server.close() closes idle connections in v20 and v21 #53939

Open
@JoMC98

Description

@JoMC98

Version

21.7.3

Platform

No response

Subsystem

No response

What steps will reproduce the bug?

No response

How often does it reproduce? Is there a required condition?

No response

What is the expected behavior? Why is that the expected behavior?

No response

What do you see instead?

In 18.20.3 release notes, it shows:
"This release fixes a regression introduced in Node.js 18.19.0 where http.server.close() was incorrectly closing idle connections."

This fix was made on this pull request in this commit where server.closeIdleConnections(); is removed from httpServerPreClose function.

This was fixed for next 18.x releases, as can be seen here, but on node 20.x and node 21.x, the regression was also included and has not been removed, as can be seen here.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    httpIssues or PRs related to the http subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions