-
Notifications
You must be signed in to change notification settings - Fork 44
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: Handle subscriber close #877
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #877 +/- ##
===========================================
- Coverage 59.81% 59.80% -0.01%
===========================================
Files 157 157
Lines 17425 17425
===========================================
- Hits 10422 10421 -1
- Misses 6066 6067 +1
Partials 937 937
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for the fix :)
@@ -70,14 +70,14 @@ func (c *simpleChannel[T]) Close() { | |||
if c.isClosed { | |||
return | |||
} | |||
c.isClosed = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
praise: this change fixes the race condition :) Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see, what you meant in the original now - this was also (somewhat sneakily) added in that PR too :)
Relevant issue(s)
Resolves #872
Description
Much simpler solution to #873 as pointed out by Fred :)
How has this been tested?
Tested manually.
Specify the platform(s) on which this was tested: