doc: update http server response 'close' event

Two places emits `close` events:

`resOnFinish` calls `emitCloseNT`, which happens when the result is
completed:
687dbd8526/lib/_http_server.js (L695)

It gets attached once the socket is assigned:
687dbd8526/lib/_http_server.js (L226)

And detached if the response is completed:
https://github.com/nodejs/node/blob/master/lib/_http_server.js#L709
687dbd8526/lib/_http_server.js (L232)

Which means, it can only be reached in this case, for premature socket
termination.

PR-URL: https://github.com/nodejs/node/pull/34472
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
Renato Mariscal
2020-07-21 16:28:33 -07:00
committed by Rich Trott
parent ea5eb8fc9c
commit f8a0e62bbf

View File

@@ -1338,7 +1338,8 @@ passed as the second parameter to the [`'request'`][] event.
added: v0.6.7
-->
Indicates that the underlying connection was terminated.
Indicates that the the response is completed, or its underlying connection was
terminated prematurely (before the response completion).
### Event: `'finish'`
<!-- YAML