]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.22] net/http: add missing call to decConnsPerHost
authorJulian Tibble <tibbes@github.com>
Wed, 14 Feb 2024 13:24:52 +0000 (13:24 +0000)
committerCarlos Amedee <carlos@golang.org>
Wed, 28 Feb 2024 20:05:29 +0000 (20:05 +0000)
commit16830ab48abb0cbc702298cafaa69839d0c9f4f9
tree3b094f723345296988e9737254304825337c8d25
parent056b0edcb8c152152021eebf4cf42adbfbe77992
[release-branch.go1.22] net/http: add missing call to decConnsPerHost

A recent change to Transport.dialConnFor introduced an early return that
skipped dialing. This path did not call decConnsPerHost, which can cause
subsequent HTTP calls to hang if Transport.MaxConnsPerHost is set.

For #65705
Fixes #65759

Change-Id: I157591114b02a3a66488d3ead7f1e6dbd374a41c
Reviewed-on: https://go-review.googlesource.com/c/go/+/564036
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Damien Neil <dneil@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
(cherry picked from commit 098a87fb1930b9ef99d394fe1bca75f1bd74ce8d)
Reviewed-on: https://go-review.googlesource.com/c/go/+/566536
Reviewed-by: Carlos Amedee <carlos@golang.org>
src/net/http/transport.go
src/net/http/transport_test.go