Skip to content

Commit dc0aa6b

Browse files
committed
fix: unregister when signal is aborted
1 parent c5c6648 commit dc0aa6b

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

lib/compat/dispatcher-weakref.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ class CompatFinalizer {
2828
})
2929
}
3030
}
31+
32+
unregister (key) {}
3133
}
3234

3335
module.exports = function () {

lib/fetch/request.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,7 @@ class Request {
371371
const abort = function () {
372372
const ac = acRef.deref()
373373
if (ac !== undefined) {
374+
requestFinalizer.unregister(ac)
374375
ac.abort(this.reason)
375376
}
376377
}

0 commit comments

Comments
 (0)