]> Cypherpunks repositories - gostls13.git/commitdiff
net/http: update docs on Transport.DisableKeepAlives
authorBrad Fitzpatrick <bradfitz@golang.org>
Fri, 29 Jun 2018 15:00:52 +0000 (15:00 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 29 Jun 2018 17:44:10 +0000 (17:44 +0000)
Be super explicit that HTTP keep-alives != TCP keep-alives.

Fixes #26128

Change-Id: I77d74a6fe077259d996543f901a58aa3e49c1093
Reviewed-on: https://go-review.googlesource.com/121616
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/net/http/transport.go

index a298e2ef03c34e31f5b121a856cd4741a17b8bbc..c3d4a95c03b6632e38cd2a21eb809218bbec8e48 100644 (file)
@@ -150,8 +150,11 @@ type Transport struct {
        // wait for a TLS handshake. Zero means no timeout.
        TLSHandshakeTimeout time.Duration
 
-       // DisableKeepAlives, if true, prevents re-use of TCP connections
-       // between different HTTP requests.
+       // DisableKeepAlives, if true, disables HTTP keep-alives and
+       // will only use the connection to the server for a single
+       // HTTP request.
+       //
+       // This is unrelated to the similarly named TCP keep-alives.
        DisableKeepAlives bool
 
        // DisableCompression, if true, prevents the Transport from