You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add ability to force close persistent connections #41578
As noted in https://nodejs.org/dist/latest-v16.x/docs/api/net.html#serverclosecallback, a net.Server will not fully close until all persistent (keep-alive) connections have reached the end of their timeout. In other languages/frameworks, e.g. Java, C#, or PHP, this is not a problem because applications written with them are typically hosted within a dedicated HTTP server that will deal with this on the application's behalf. However, if we look at another language in which applications are typically written to provide a direct HTTP server we can see that this problem showed up there and has been solved -- golang/go#4674 (comment) (final resolution https://go.dev/doc/go1.8#http_shutdown):
HTTP Server Graceful Shutdown
The HTTP Server now has support for graceful shutdown using the new Server.Shutdown method and abrupt shutdown using the new Server.Close method.
Activity
jsumners commentedon Jan 18, 2022
cc: @mcollina
mcollina commentedon Jan 18, 2022
cc @nodejs/http
http: added connection closing methods
http: added connection closing methods