Skip to content

Commit

Permalink
doc: clarify IncomingMessage.destroy() description
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
XMB5 authored and targos committed Dec 5, 2019
1 parent fcae355 commit 54cf114
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/api/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -1672,8 +1672,8 @@ added: v0.3.0
* `error` {Error}

Calls `destroy()` on the socket that received the `IncomingMessage`. If `error`
is provided, an `'error'` event is emitted and `error` is passed as an argument
to any listeners on the event.
is provided, an `'error'` event is emitted on the socket and `error` is passed
as an argument to any listeners on the event.

### message.headers
<!-- YAML
Expand Down

0 comments on commit 54cf114

Please sign in to comment.