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(v2/callctx): fix SetHeader race by cloning header map #326

Merged
merged 2 commits into from
Feb 23, 2024

Conversation

noahdietz
Copy link
Contributor

Clone any existing header map instead of reusing it directly to avoid a data race when the same context is reused multiple times each with a call to SetHeaders with the same header key.

Updates #325

@noahdietz noahdietz requested a review from a team as a code owner February 23, 2024 19:30
v2/callctx/callctx.go Outdated Show resolved Hide resolved
@noahdietz noahdietz merged commit 534311f into googleapis:main Feb 23, 2024
4 checks passed
@noahdietz noahdietz deleted the callctx-race branch February 23, 2024 22:00
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