commit | 410d19ee5650d9c64ed4392cb046ab7fde0d86cc | [log] [tgz] |
---|---|---|
author | Damien Neil <dneil@google.com> | Fri May 17 14:29:29 2024 -0700 |
committer | Damien Neil <dneil@google.com> | Tue May 21 22:20:24 2024 +0000 |
tree | db6638a54f074b503c2612678a9c1611524e7fb4 | |
parent | 332fe235e654eb162d5de50acbdf5b2a11eaa68a [diff] |
http2: avoid racy access to clientStream.requestedGzip clientStream.requestedGzip is set from clientStream.writeRequest, and examined by clientConn.readLoop. I'm not sure if there's any possible way for an actual data race to happen here in practice, since the read loop should only examine the field after the request is sent by writeRequest, but it's enough for the race detector to complain. Set the field in ClientConn.roundTrip instead, before the clientStream has become accessible to any other goroutines. No test, but a following CL has race detector failures without this change. Change-Id: Id30f1b95bcfcc35c213440e0e47cce3feaaff06d Reviewed-on: https://go-review.googlesource.com/c/net/+/586245 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Jonathan Amsterdam <jba@google.com>
This repository holds supplementary Go networking libraries.
The easiest way to install is to run go get -u golang.org/x/net
. You can also manually git clone the repository to $GOPATH/src/golang.org/x/net
.
This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html. The main issue tracker for the net repository is located at https://github.com/golang/go/issues. Prefix your issue with “x/net:” in the subject line, so it is easy to find.