doc: fix order of events when request is aborted

PR-URL: https://github.com/nodejs/node/pull/24779
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
This commit is contained in:
Luigi Pinca 2018-12-02 09:24:47 +01:00
parent b5e9086c5a
commit 63469ed15c

View File

@ -2075,9 +2075,9 @@ will be emitted in the following order:
* `'socket'` * `'socket'`
* (`req.abort()` called here) * (`req.abort()` called here)
* `'abort'` * `'abort'`
* `'close'`
* `'error'` with an error with message `'Error: socket hang up'` and code * `'error'` with an error with message `'Error: socket hang up'` and code
`'ECONNRESET'` `'ECONNRESET'`
* `'close'`
If `req.abort()` is called after the response is received, the following events If `req.abort()` is called after the response is received, the following events
will be emitted in the following order: will be emitted in the following order:
@ -2087,8 +2087,8 @@ will be emitted in the following order:
* `'data'` any number of times, on the `res` object * `'data'` any number of times, on the `res` object
* (`req.abort()` called here) * (`req.abort()` called here)
* `'abort'` * `'abort'`
* `'close'`
* `'aborted'` on the `res` object * `'aborted'` on the `res` object
* `'close'`
* `'end'` on the `res` object * `'end'` on the `res` object
* `'close'` on the `res` object * `'close'` on the `res` object