aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile
diff options
context:
space:
mode:
authorDamien Neil <dneil@google.com>2024-04-04 11:01:28 -0700
committerDamien Neil <dneil@google.com>2024-04-17 21:11:57 +0000
commit334ce510046ad30b1be466634cf313aad3040892 (patch)
treee60f4653ddac8473abf679a3ead5fbf59d0d8d09 /src/cmd/compile
parent4742c52e101ecf4aacebe5148a1cb172bdadb1d4 (diff)
downloadgo-334ce510046ad30b1be466634cf313aad3040892.tar.xz
net/http: don't cancel Dials when requests are canceled
Currently, when a Transport creates a new connection for a request, it uses the request's Context to make the Dial. If a request times out or is canceled before a Dial completes, the Dial is canceled. Change this so that the lifetime of a Dial call is not bound by the request that originated it. This change avoids a scenario where a Transport can start and then cancel many Dial calls in rapid succession: - Request starts a Dial. - A previous request completes, making its connection available. - The new request uses the now-idle connection, and completes. - The request Context is canceled, and the Dial is aborted. Fixes #59017 Change-Id: I996ffabc56d3b1b43129cbfd9b3e9ea7d53d263c Reviewed-on: https://go-review.googlesource.com/c/go/+/576555 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'src/cmd/compile')
0 files changed, 0 insertions, 0 deletions