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

[R4R] fix:defer bloomprocessor close #860

Merged
merged 3 commits into from
Apr 28, 2022

Conversation

qinglin89
Copy link
Contributor

Description

There's risk of memory leak for channel in bloomProcessors in Process when an early return happen.

Rationale

We need to ensure closing channel (bloomProcessors.Close()) before return

Example

N/A

Changes

Notable changes:

  • user defer to make sure bloomProcessors.Close() be executed before Process return
  • keep current bloomProcessors.Close() for efficiency.

@unclezoro unclezoro merged commit 717b38c into bnb-chain:develop Apr 28, 2022
j75689 pushed a commit to j75689/bsc that referenced this pull request Jun 15, 2022
* fix:defer bloomprocessor close

* fix: fix deadlock in Close

* perf:rm defer bloomprocessors Close and manual close before return
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.

4 participants