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

Improve Handling of stopped channel stopping the Server #21

Merged
merged 1 commit into from
Apr 19, 2024

Conversation

dammarco
Copy link

With this PR, we now initialise the stopped channel also for the dispatcher.

I've also added a unit test that shows that behavior and add an additional guard to not close a channel when it is already closed.

@dammarco dammarco requested a review from hnicolaysen April 19, 2024 07:59
@dammarco dammarco added the bug Something isn't working label Apr 19, 2024
@dammarco dammarco self-assigned this Apr 19, 2024
@coveralls
Copy link

coveralls commented Apr 19, 2024

Pull Request Test Coverage Report for Build 8750366009

Details

  • 11 of 12 (91.67%) changed or added relevant lines in 2 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.03%) to 88.999%

Changes Missing Coverage Covered Lines Changed/Added Lines %
ocppj/server.go 5 6 83.33%
Files with Coverage Reduction New Missed Lines %
ws/websocket.go 2 90.25%
Totals Coverage Status
Change from base Build 8749519041: -0.03%
Covered Lines: 6529
Relevant Lines: 7336

💛 - Coveralls

@dammarco dammarco force-pushed the fix/fix_close_nil_channel_panic_on_stop branch from df9248d to 62271c7 Compare April 19, 2024 08:03
Copy link

@hnicolaysen hnicolaysen left a comment

Choose a reason for hiding this comment

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

Nice, even prettier than discussed 😁

@dammarco dammarco merged commit efe20cd into gridx_extensions Apr 19, 2024
2 checks passed
@dammarco dammarco deleted the fix/fix_close_nil_channel_panic_on_stop branch April 19, 2024 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants