We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 85d7eed commit 368f071Copy full SHA for 368f071
lib/api/api-request.js
@@ -65,16 +65,12 @@ class RequestHandler extends AsyncResource {
65
} else if (signal) {
66
this.removeAbortListener = util.addAbortListener(this.signal, () => {
67
this.reason = this.signal.reason ?? new RequestAbortedError()
68
- } else {
69
- this.removeAbortListener = util.addAbortListener(this.signal, () => {
70
- this.reason = this.signal.reason ?? new RequestAbortedError()
71
- if (this.res) {
72
- util.destroy(this.res, this.reason)
73
- } else if (this.abort) {
74
- this.abort(this.reason)
75
- }
76
- })
77
+ if (this.res) {
+ util.destroy(this.res, this.reason)
+ } else if (this.abort) {
+ this.abort(this.reason)
+ }
+ })
78
}
79
80
0 commit comments