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

cleanup: prevent leaks from time.After #11983

Merged
merged 1 commit into from
Feb 3, 2022
Merged

cleanup: prevent leaks from time.After #11983

merged 1 commit into from
Feb 3, 2022

Commits on Feb 2, 2022

  1. cleanup: prevent leaks from time.After

    This PR replaces use of time.After with a safe helper function
    that creates a time.Timer to use instead. The new function returns
    both a time.Timer and a Stop function that the caller must handle.
    
    Unlike time.NewTimer, the helper function does not panic if the duration
    set is <= 0.
    shoenig committed Feb 2, 2022
    Configuration menu
    Copy the full SHA
    c1e033c View commit details
    Browse the repository at this point in the history