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

[v16] fix incorrect usage of time.Timer #45846

Merged
merged 1 commit into from
Aug 26, 2024

Conversation

tigrato
Copy link
Contributor

@tigrato tigrato commented Aug 26, 2024

Backport #45839 to branch/v16

Calling `timer.Stop` in a timer that already fired results in `Stop` returning false and subsequent drain will block because the channel isn't closed.

This PR fixes the drain behaviour by wrapping the drain operation in a non-blocking select.
@tigrato tigrato added the no-changelog Indicates that a PR does not require a changelog entry label Aug 26, 2024
@tigrato tigrato enabled auto-merge August 26, 2024 16:46
@tigrato tigrato added the release-16.2 To be released in v16.2 label Aug 26, 2024
@tigrato tigrato added this pull request to the merge queue Aug 26, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 26, 2024
@tigrato tigrato added this pull request to the merge queue Aug 26, 2024
Merged via the queue into branch/v16 with commit 957ef37 Aug 26, 2024
38 of 39 checks passed
@tigrato tigrato deleted the bot/backport-45839-branch/v16 branch August 26, 2024 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport no-changelog Indicates that a PR does not require a changelog entry release-16.2 To be released in v16.2 size/sm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants