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

Fix unclosed tickers/timers #7190

Merged
merged 10 commits into from
Sep 8, 2020
Merged

Conversation

farazdagi
Copy link
Contributor

What type of PR is this?

Bug fix

What does this PR do? Why is it needed?

  • Timers and tickers open channels, and to release associated resources must be stopped. So, this PR:
    • Adds Stop() calls whenever they are missing
    • In number of places moves (timer|ticker).Stop() method closer to object creation (invoking the stopping routing with defer). This is done as a more natural way to work with resources in Go: you allocate resources, and if you can, you immediately call defer releaseFn().

Which issues(s) does this PR fix?

N/A

Other notes for review

@farazdagi farazdagi requested a review from a team as a code owner September 8, 2020 11:43
@farazdagi farazdagi self-assigned this Sep 8, 2020
@codecov
Copy link

codecov bot commented Sep 8, 2020

Codecov Report

Merging #7190 into master will increase coverage by 1.57%.
The diff coverage is 70.37%.

@@            Coverage Diff             @@
##           master    #7190      +/-   ##
==========================================
+ Coverage   60.07%   61.65%   +1.57%     
==========================================
  Files         323      410      +87     
  Lines       27422    32548    +5126     
==========================================
+ Hits        16473    20066    +3593     
- Misses       8733     9617     +884     
- Partials     2216     2865     +649     

@prylabs-bulldozer prylabs-bulldozer bot merged commit 8baa22f into master Sep 8, 2020
@delete-merged-branch delete-merged-branch bot deleted the fix-unclosed-tickers-timers branch September 8, 2020 18:05
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