net/http: method decHostConnCount should not dec counter when somebody is block on connPerHostAvailable #29889
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
About
net/http/transport.getConn
When current conn number is greater than MaxConnPerHost,
incHostConnCount
return connPerHostAvailable and caller block on this chan, but connPerHostCount will not inc.When somebody is block on connPerHostAvailable and one conn be closed,
decHostConnCount
notify and connPerHostCount dec.One Example:
Time 1
getConn
and get connA, connPerHostCount now is oneTime 2
getConn
but block on connPerHostAvailable or idleConnChTime 3
Time 4
getConn
and create connCcurrent two conns exist, but MaxConnsPerHost is one.
What did you expect to see?
When somebody is block on connPerHostAvailable and one conn be closed,
decHostConnCount
notify and connPerHostCount don't dec.The text was updated successfully, but these errors were encountered: