Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
net/http: method decHostConnCount should not dec counter when somebody is block on connPerHostAvailable #29889
What version of Go are you using (
Hey all! We appear to have run into this issue as well. It manifested as MaxConnsPerHost not being respected if concurrently made requests failed and then begin to succeed. Here's a repro demonstrating this behavior: https://github.com/billybanfield/tcpbug/blob/master/tcpbug.go. Happy to provide any additional info needed here.
Moving the decrement for connPerHostCount in transport.go as suggested by the original reporter fixes the issue.