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 bug : should drain channel of timer after stop #612

Merged
merged 1 commit into from
Aug 14, 2023

Conversation

ikenchina
Copy link
Contributor

Ensure the channel is empty after a call to Stop.

Changes

Drain channel.

Verification

Document of go Timer notices that : To ensure the channel is empty after a call to Stop, check the // return value and drain the channel.

@google-cla
Copy link

google-cla bot commented Aug 8, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@ikenchina
Copy link
Contributor Author

update

@johanbrandhorst
Copy link
Collaborator

Have you been able to sign the CLA?

@ikenchina
Copy link
Contributor Author

Yes

@johanbrandhorst johanbrandhorst merged commit a53adc7 into grpc-ecosystem:main Aug 14, 2023
6 checks passed
@johanbrandhorst
Copy link
Collaborator

Thanks for your contribution!

@ash2k
Copy link
Contributor

ash2k commented Aug 29, 2023

The timer is discarded after this use, it doesn't matter if the channel has a value or not. No need to drain it :)

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