Skip to content

Commit

Permalink
allow connection reuse on HTTP connections
Browse files Browse the repository at this point in the history
The bug referred to was fixed in Go 1.6.
  • Loading branch information
rogpeppe committed Sep 22, 2016
1 parent 50f2d54 commit 6b3bdc0
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions http.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@ var insecureClient = (*http.Client)(nil)
var insecureClientMutex = sync.Mutex{}

func init() {
// See https://code.google.com/p/go/issues/detail?id=4677
// We need to force the connection to close each time so that we don't
// hit the above Go bug.
defaultTransport := http.DefaultTransport.(*http.Transport)
defaultTransport.DisableKeepAlives = true
installHTTPDialShim(defaultTransport)
registerFileProtocol(defaultTransport)
}
Expand Down

0 comments on commit 6b3bdc0

Please sign in to comment.