From cbce223da02bb198b9984c161c6cd6291a80b3d9 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Fri, 29 Jun 2018 15:00:52 +0000 Subject: [PATCH] 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 --- src/net/http/transport.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 -- 2.50.0