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

response_writer: make read and write status code thread safe #123

Merged
merged 2 commits into from May 13, 2022

Conversation

unknwon
Copy link
Member

@unknwon unknwon commented May 13, 2022

Describe the pull request

Read / write operations of status code was not thread-safe which causes problem when a middleware responds data to the client asynchronously.

Link to the issue: flamego/sse#1

Checklist

  • I agree to follow the Code of Conduct by submitting this pull request.
  • I have read and acknowledge the Contributing guide.
  • I have added test cases to cover the new code.

@unknwon unknwon requested a review from a team May 13, 2022 16:16
@unknwon unknwon changed the title response_writer: make R/W status code thread safe response_writer: make read and write status code thread safe May 13, 2022
@codecov
Copy link

codecov bot commented May 13, 2022

Codecov Report

Merging #123 (af9f166) into main (b865223) will decrease coverage by 0.16%.
The diff coverage is 75.00%.

@@            Coverage Diff             @@
##             main     #123      +/-   ##
==========================================
- Coverage   87.74%   87.57%   -0.17%     
==========================================
  Files          17       17              
  Lines        1142     1143       +1     
==========================================
- Hits         1002     1001       -1     
- Misses        101      102       +1     
- Partials       39       40       +1     

@unknwon unknwon merged commit 968cb29 into main May 13, 2022
@unknwon unknwon deleted the jc/response-write-race branch May 13, 2022 16:27
@unknwon
Copy link
Member Author

unknwon commented May 13, 2022

https://github.com/flamego/flamego/releases/tag/v1.2.1 has been tagged for this merge.

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

2 participants