Skip to content

internal/transport: temporarily store prevGoAwayId before releasing the lock in http2_client #8200

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

Closed
wants to merge 1 commit into from

Conversation

purnesh42H
Copy link
Contributor

Fixes: #8192

RELEASE NOTES: None

@arjan-bal arjan-bal removed their assignment Mar 25, 2025
@dfawley
Copy link
Member

dfawley commented Mar 25, 2025

All accesses of t.prevGoAwayId happen in this one function, which is never called concurrently. So I don't believe any change is needed here.

Just because some field is accessed with the lock held sometimes but not others, does not mean that it always must be accessed with the lock held. I think we can close the issue as not-a-bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Data Race]:a potential data race occurs in the prevGoAwayID field in http2_client.go
3 participants