Skip to content

Conversation

@zone117x
Copy link
Contributor

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

@zone117x zone117x requested a review from rafaelcr October 31, 2024 14:22
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

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants