Skip to content

doc: clarify IncomingMessage.destroy() description - #30255

Closed
XMB5 wants to merge 1 commit into
nodejs:masterfrom
XMB5:message-clarify
Closed

doc: clarify IncomingMessage.destroy() description#30255
XMB5 wants to merge 1 commit into
nodejs:masterfrom
XMB5:message-clarify

Conversation

@XMB5

@XMB5 XMB5 commented Nov 4, 2019

Copy link
Copy Markdown
Contributor

State that the 'error' event is emitted on the underlying socket, not
the IncomingMessage object.

Here are the relevant parts in the code:

Here's a program that demonstrates this

http.createServer(req=>{
  req.on('error',console.error);
  req.destroy(new Error('hi'));
}).listen(8080)

Then, curl localhost:8080
The Node.js process doesn't print the error

Checklist
State that the 'error' event is emitted on the underlying socket, not
the IncomingMessage object.
@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to Node.js documentation. http Issues and PRs related to the http subsystem. labels Nov 4, 2019
@lundibundi lundibundi added the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Nov 23, 2019
addaleax pushed a commit that referenced this pull request Nov 30, 2019
State that the 'error' event is emitted on the underlying socket, not
the IncomingMessage object.

PR-URL: #30255
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
@addaleax

Copy link
Copy Markdown
Member

Landed in c8930fb, thanks for the PR and sorry for the delay!

@addaleax addaleax closed this Nov 30, 2019
addaleax pushed a commit that referenced this pull request Nov 30, 2019
State that the 'error' event is emitted on the underlying socket, not
the IncomingMessage object.

PR-URL: #30255
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
@BridgeAR BridgeAR mentioned this pull request Dec 3, 2019
targos pushed a commit that referenced this pull request Dec 5, 2019
State that the 'error' event is emitted on the underlying socket, not
the IncomingMessage object.

PR-URL: #30255
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
@BethGriggs BethGriggs mentioned this pull request Dec 9, 2019
MylesBorins pushed a commit that referenced this pull request Dec 17, 2019
State that the 'error' event is emitted on the underlying socket, not
the IncomingMessage object.

PR-URL: #30255
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
@BethGriggs BethGriggs mentioned this pull request Dec 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. doc Issues and PRs related to Node.js documentation. http Issues and PRs related to the http subsystem.

5 participants