Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: clarify IncomingMessage.destroy() description #30255

Closed
wants to merge 1 commit into from

Conversation

@XMB5
Copy link
Contributor

XMB5 commented Nov 4, 2019

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.
@jasnell
jasnell approved these changes Nov 5, 2019
@lundibundi

This comment has been minimized.

addaleax added 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

This comment has been minimized.

Copy link
Member

addaleax commented Nov 30, 2019

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

@addaleax addaleax closed this Nov 30, 2019
addaleax added 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 added 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>
Sebastien-Ahkrin added a commit to Sebastien-Ahkrin/node 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: nodejs#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
Sebastien-Ahkrin added a commit to Sebastien-Ahkrin/node that referenced this pull request Dec 11, 2019
State that the 'error' event is emitted on the underlying socket, not
the IncomingMessage object.

PR-URL: nodejs#30255
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
MylesBorins added 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
Projects
None yet
5 participants
You can’t perform that action at this time.