Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc: update http server response 'close' event
Two places emits `close` events: `resOnFinish` calls `emitCloseNT`, which happens when the result is completed: https://github.com/nodejs/node/blob/687dbd85263f433cc351c6daa83f9296a1d0bb4f/lib/_http_server.js#L695 It gets attached once the socket is assigned: https://github.com/nodejs/node/blob/687dbd85263f433cc351c6daa83f9296a1d0bb4f/lib/_http_server.js#L226 And detached if the response is completed: https://github.com/nodejs/node/blob/master/lib/_http_server.js#L709 https://github.com/nodejs/node/blob/687dbd85263f433cc351c6daa83f9296a1d0bb4f/lib/_http_server.js#L232 Which means, it can only be reached in this case, for premature socket termination. PR-URL: #34472 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Robert Nagy <[email protected]> Reviewed-By: Rich Trott <[email protected]>
- Loading branch information