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 that worker doesn't return after context cancel #71

Merged
merged 2 commits into from
Sep 1, 2024

Conversation

hongkuancn
Copy link
Collaborator

I think we also need to return immediately in the inner context.Done(), otherwise it is possible to loop all the time. According to https://stackoverflow.com/a/51296312, it also returns immediately.

Copy link

codecov bot commented Aug 31, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 98.35%. Comparing base (5f162d4) to head (1b21aaa).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
worker.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #71      +/-   ##
==========================================
- Coverage   99.00%   98.35%   -0.66%     
==========================================
  Files           4        4              
  Lines         302      304       +2     
==========================================
  Hits          299      299              
- Misses          3        5       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

worker.go Show resolved Hide resolved
Copy link
Owner

@alitto alitto left a comment

Choose a reason for hiding this comment

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

Thank you!

@alitto alitto merged commit a64a339 into alitto:main Sep 1, 2024
17 of 18 checks passed
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.

2 participants