mirror of
https://github.com/SukkaW/Surge.git
synced 2025-12-12 01:00:34 +08:00
14 lines
663 B
Diff
14 lines
663 B
Diff
diff --git a/lib/api/api-request.js b/lib/api/api-request.js
|
|
index ced5590d21053ddd4c6e81e25fb1a3baea08e2c5..be17d62877403cfc8afe10a75ceb67bf1de5e56d 100644
|
|
--- a/lib/api/api-request.js
|
|
+++ b/lib/api/api-request.js
|
|
@@ -73,7 +73,7 @@ class RequestHandler extends AsyncResource {
|
|
this.removeAbortListener = util.addAbortListener(this.signal, () => {
|
|
this.reason = this.signal.reason ?? new RequestAbortedError()
|
|
if (this.res) {
|
|
- util.destroy(this.res, this.reason)
|
|
+ util.destroy(this.res.on('error', util.nop), this.reason)
|
|
} else if (this.abort) {
|
|
this.abort(this.reason)
|
|
}
|