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

Using time.Timers instead of time.After() #1704

Merged
merged 3 commits into from
Apr 6, 2021
Merged

Conversation

arschles
Copy link
Contributor

@arschles arschles commented Mar 29, 2021

As explained in the docs for time.After(), the time.Timer that underpins the call to time.After is not released and recovered by the GC. This PR fixes the resulting leak by creating and releasing time.Timers instead of using time.After()

Checklist

  • Commits are signed with Developer Certificate of Origin (DCO - learn more)
  • Tests have been added
  • (N/A) A PR is opened to update our Helm chart (repo) (if applicable, ie. when deployment manifests are modified)
  • (N/A) A PR is opened to update the documentation on (repo) (if applicable)
  • Changelog has been updated

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
@arschles arschles requested a review from zroubalik as a code owner March 29, 2021 22:30
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
CHANGELOG.md Outdated Show resolved Hide resolved
@zroubalik zroubalik merged commit 458691d into kedacore:main Apr 6, 2021
@zroubalik
Copy link
Member

Thanks a lot for this!

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