From: Brad Fitzpatrick Date: Fri, 29 Jun 2018 15:00:52 +0000 (+0000) Subject: net/http: update docs on Transport.DisableKeepAlives X-Git-Tag: go1.11beta2~250 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=cbce223da02bb198b9984c161c6cd6291a80b3d9;p=gostls13.git net/http: update docs on Transport.DisableKeepAlives 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 --- diff --git a/src/net/http/transport.go b/src/net/http/transport.go index a298e2ef03..c3d4a95c03 100644 --- a/src/net/http/transport.go +++ b/src/net/http/transport.go @@ -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