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

pool: Prevent potential read goroutine leak. #375

Merged
merged 1 commit into from
Sep 16, 2023

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Sep 15, 2023

This requires #373.

This ensures the send to the read channel for a client respects the context since it could otherwise end up hanging forever when sending to the channel that no longer has a goroutine reading from it thereby leaking the goroutine.

It also includes the read goroutine in the overall waitgroup for the client to help ensure it shuts down as intended.

Copy link
Member

@jholdstock jholdstock left a comment

Choose a reason for hiding this comment

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

Looks good, needs rebase.

This ensures the send to the read channel for a client respects the
context since it could otherwise end up hanging forever when sending to
the channel that no longer has a goroutine reading from it thereby
leaking the goroutine.

It also includes the read goroutine in the overall waitgroup for the
client to help ensure it shuts down as intended.
@jholdstock jholdstock merged commit 838b259 into decred:master Sep 16, 2023
2 checks passed
@davecgh davecgh deleted the pool_fix_read_gr_leak branch September 16, 2023 08:49
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.

2 participants