mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-28 17:41:54 +08:00
Patch undici and use w/ request
This commit is contained in:
13
patches/undici.patch
Normal file
13
patches/undici.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user