doc: clarify IncomingMessage.destroy() description
State that the 'error' event is emitted on the underlying socket, not the IncomingMessage object.
Here are the relevant parts in the code:
- IncomingMessage.destroy
- which calls Steam.destroy
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
-
documentation is changed or added -
commit message follows commit guidelines