Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 75ed2f6

Browse filesBrowse files
renatomariscaladdaleax
authored andcommitted
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 <jasnell@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent e30ddac commit 75ed2f6
Copy full SHA for 75ed2f6

File tree

Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Open diff view settings
Collapse file

‎doc/api/http.md‎

Copy file name to clipboardExpand all lines: doc/api/http.md
+2-1Lines changed: 2 additions & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1239,7 +1239,8 @@ passed as the second parameter to the [`'request'`][] event.
12391239
added: v0.6.7
12401240
-->
12411241

1242-
Indicates that the underlying connection was terminated.
1242+
Indicates that the the response is completed, or its underlying connection was
1243+
terminated prematurely (before the response completion).
12431244

12441245
### Event: `'finish'`
12451246
<!-- YAML

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.