Skip to content

Commit

Permalink
fix: unregister when signal is aborted
Browse files Browse the repository at this point in the history
  • Loading branch information
tsctx committed Dec 21, 2023
1 parent c5c6648 commit dc0aa6b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/compat/dispatcher-weakref.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ class CompatFinalizer {
})
}
}

unregister (key) {}
}

module.exports = function () {
Expand Down
1 change: 1 addition & 0 deletions lib/fetch/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ class Request {
const abort = function () {
const ac = acRef.deref()
if (ac !== undefined) {
requestFinalizer.unregister(ac)
ac.abort(this.reason)
}
}
Expand Down

0 comments on commit dc0aa6b

Please sign in to comment.