Skip to content

Commit a25626c

Browse files
XMB5addaleax
authored andcommitted
doc: clarify IncomingMessage.destroy() description
State that the 'error' event is emitted on the underlying socket, not the IncomingMessage object. PR-URL: #30255 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Denys Otrishko <[email protected]>
1 parent 4800b62 commit a25626c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/api/http.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1798,8 +1798,8 @@ added: v0.3.0
17981798
* `error` {Error}
17991799

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

18041804
### message.headers
18051805
<!-- YAML

0 commit comments

Comments
 (0)