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

Export emitRuntimeStats to provide a workaround for goroutine leak. #121

Merged
merged 1 commit into from Dec 8, 2020

Conversation

ncabatoff
Copy link
Contributor

When EnableRuntimeMetrics is true, New will leak a goroutine that collects stats periodically. Export the method that does the stats collection so that those who are willing to call it themselves can avoid that goroutine leak.

Copy link
Contributor

@dnephin dnephin left a comment

Choose a reason for hiding this comment

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

Nice! I've been wanting to fix this leak. This PR looks like a good way to solve the problem.

@jefferai
Copy link
Member

jefferai commented Dec 8, 2020

Doesn't seem like it's a leak if you've enabled the option :-) But happy to have the change.

@jefferai jefferai merged commit e640e04 into hashicorp:master Dec 8, 2020
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.

None yet

3 participants