Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: unlisten "abort" event on offListener #9

Merged
merged 1 commit into from
Oct 11, 2023
Merged

fix: unlisten "abort" event on offListener #9

merged 1 commit into from
Oct 11, 2023

Conversation

azu
Copy link
Owner

@azu azu commented Oct 11, 2023

It was missing that removeEventListner for abort event on abortSignal.

@azu azu linked an issue Oct 11, 2023 that may be closed by this pull request
@azu azu added the Type: Bug Bug or Bug fixes label Oct 11, 2023
error = new Error("Abort Error");
};
const offListener = () => {
unHandle?.();
abortSignal?.removeEventListener("abort", onAbort);
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<-> abortSignal?.addEventListener("abort", onAbort, { once: true });

@azu azu merged commit b402d9a into main Oct 11, 2023
4 checks passed
@azu azu deleted the feature/8 branch October 11, 2023 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Bug or Bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Maybe a redundant code
1 participant