mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
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#L709687dbd8526/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:
committed by
Rich Trott
parent
ea5eb8fc9c
commit
f8a0e62bbf
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user