]> Cypherpunks repositories - gostls13.git/commit
net/http: add missing call to decConnsPerHost
authorJulian Tibble <tibbes@github.com>
Wed, 14 Feb 2024 13:24:52 +0000 (13:24 +0000)
committerGopher Robot <gobot@golang.org>
Tue, 20 Feb 2024 14:56:00 +0000 (14:56 +0000)
commit098a87fb1930b9ef99d394fe1bca75f1bd74ce8d
tree2c9755a238c8c7895fe139c309d390e2c2b77545
parentd42cd452dcca76819dd385a7775f8453d6255dbd
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.

Fixes: #65705
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>
src/net/http/transport.go
src/net/http/transport_test.go