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

Fixes memory leak when blocking on /event/list #4482

Merged
merged 1 commit into from
Aug 2, 2018
Merged

Conversation

banks
Copy link
Member

@banks banks commented Aug 2, 2018

See #3941

This fixes the memory leak by clearing the chan from the eventNotify group at the end of the request.

I also grepped through to find any other callers that might be effected but the only other caller was NotifyGroup.WaitCh which in turn was only used in tests.

I removed that method entirely since it will always leak a chan if anyone actually used it for real, and made an equivalent test helper instead where the group is on the stack and so the chans don't leak for ever.

Copy link
Member

@mkeeler mkeeler left a comment

Choose a reason for hiding this comment

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

LGTM

@banks banks merged commit 71dd3b4 into master Aug 2, 2018
@banks banks deleted the fix-mem-leak branch August 2, 2018 13:55
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