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 race condition in Poller tests #13110

Merged
merged 2 commits into from
May 6, 2024
Merged

Conversation

DylanTinianov
Copy link
Contributor

@DylanTinianov DylanTinianov commented May 6, 2024

Update the Poller to return a channel rather than accept one. This prevents a user from closing the channel and in turn a race condition from occurring if the channel is closed before sending which causes a panic.

@DylanTinianov DylanTinianov changed the title Create polling channel Fix race condition in Poller tests May 6, 2024
Copy link
Collaborator

@dhaidashenko dhaidashenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point!

@DylanTinianov DylanTinianov marked this pull request as ready for review May 6, 2024 17:27
@DylanTinianov DylanTinianov requested a review from a team as a code owner May 6, 2024 17:27
@jmank88 jmank88 added this pull request to the merge queue May 6, 2024
Merged via the queue into develop with commit 466d161 May 6, 2024
105 checks passed
@jmank88 jmank88 deleted the fix/poller-race-condition branch May 6, 2024 17:49
asoliman92 pushed a commit that referenced this pull request Jul 31, 2024
* Create polling channel

* Update poller_test.go
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.

3 participants