{"library":"http-close","type":"library","category":null,"description":"This `http-close` package for Node.js provides a mechanism to gracefully shut down an HTTP server by managing open TCP sockets. Currently at version 1.0.0, it appears to be a stable utility, likely in maintenance mode given its focused scope and the absence of rapid version increments. It differentiates itself by intelligently handling various socket states during `server.close()`: it destroys keep-alive sockets without active responses, sends `Connection: close` headers for requests where headers haven't been sent, and applies a configurable timeout (default 5 seconds) to pending connections. If a socket times out after `server.close()` has been called, the module intervenes to respond with a 500 status code before ending the connection for requests with unsent headers, and forcefully destroys all other remaining sockets. This ensures a clean exit for the server process, mitigating the common issue of hanging connections during shutdown.","language":"javascript","status":"maintenance","version":"1.0.0","tags":["javascript","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install http-close","imports":["import httpClose from 'http-close';"]},{"cmd":"yarn add http-close","imports":[]},{"cmd":"pnpm add http-close","imports":[]}],"homepage":null,"github":"https://github.com/tellnes/http-close","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/http-close","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/http-close/compatibility"}}