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: memleak in timeout w/ abort signal #32

Merged
merged 1 commit into from
Oct 31, 2024
Merged

Conversation

zone117x
Copy link
Member

Hotfix for the timeout function. When provided an AbortSignal, the event listeners were not cleared which results in memory leaks for long-lived AbortSignals/Controllers, and these error logs:

(node:1) MaxListenersExceededWarning: Possible EventTarget memory leak detected. 1983 abort listeners added to [AbortSignal]. MaxListeners is 1500. Use events.setMaxListeners() to increase limit

Copy link
Collaborator

@rafaelcr rafaelcr left a comment

Choose a reason for hiding this comment

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

Oh wow, excellent find! We should update all our APIs from this, they all use timeout

@zone117x zone117x merged commit d56a9ad into master Oct 31, 2024
4 checks passed
@zone117x zone117x deleted the fix/timeout-memleak branch October 31, 2024 16:44
blockstack-devops pushed a commit that referenced this pull request Oct 31, 2024
## [1.7.2](v1.7.1...v1.7.2) (2024-10-31)

### Bug Fixes

* memleak in timeout w/ abort signal ([#32](#32)) ([d56a9ad](d56a9ad))
@blockstack-devops
Copy link

🎉 This PR is included in version 1.7.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants