Skip to content

Prevent unbounded BLERadio._connection_cache growth from causing memory exhaustion (issue #146) #147

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

Merged
merged 1 commit into from
Dec 13, 2021

Conversation

300bps
Copy link

@300bps 300bps commented Dec 12, 2021

This patch prevents the issue described in #146 from causing memory exhaustion that leads to app hang/crash.

The approach taken was to purge the cache of stale connection entries that have been disconnected each time a new connection is added to the cache.

…ger valid. This prevents unbounded cache growth from causing memory exhaustion as described in github issue #146.
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

Nice find! I like the approach you take here. Thanks for the fix!

@tannewt tannewt merged commit a695cde into adafruit:main Dec 13, 2021
@300bps
Copy link
Author

300bps commented Dec 14, 2021

@tannewt Thanks for the comment - much appreciated! :)

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

Successfully merging this pull request may close these issues.

Memory Leak After Disconnect (when acting as a BLE central)
3 participants