GeezerVison is showing github.com — doc: fix order of events when request is aborted · nodejs/node@e9ad526
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: doc/api/http.md +4-4Lines changed: 4 additions & 4 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -2081,9 +2081,9 @@ will be emitted in the following order: |
2081 | 2081 | * `'socket'` |
2082 | 2082 | * (`req.abort()` called here) |
2083 | 2083 | * `'abort'` |
2084 | | -* `'close'` |
2085 | 2084 | * `'error'` with an error with message `'Error: socket hang up'` and code |
2086 | 2085 | `'ECONNRESET'` |
| 2086 | +* `'close'` |
2087 | 2087 |
|
2088 | 2088 | If `req.abort()` is called after the response is received, the following events |
2089 | 2089 | will be emitted in the following order: |
@@ -2093,10 +2093,10 @@ will be emitted in the following order: |
2093 | 2093 | * `'data'` any number of times, on the `res` object |
2094 | 2094 | * (`req.abort()` called here) |
2095 | 2095 | * `'abort'` |
| 2096 | +* `'aborted'` on the `res` object |
2096 | 2097 | * `'close'` |
2097 | | - * `'aborted'` on the `res` object |
2098 | | - * `'end'` on the `res` object |
2099 | | - * `'close'` on the `res` object |
| 2098 | +* `'end'` on the `res` object |
| 2099 | +* `'close'` on the `res` object |
2100 | 2100 |
|
2101 | 2101 | Note that setting the `timeout` option or using the `setTimeout()` function will |
2102 | 2102 | not abort the request or do anything besides add a `'timeout'` event. |
|