From: Brad Fitzpatrick Date: Thu, 17 Jan 2019 23:22:47 +0000 (-0800) Subject: net/http: clarify Transport connection reuse docs a bit X-Git-Tag: go1.12rc1~62 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=246e6ceb3bdbcfdb9f562c67622c3d67a45eb70d;p=gostls13.git net/http: clarify Transport connection reuse docs a bit Updates #26095 (or fixes it) Change-Id: I92488dabe823b82e1ba534648fe6d63d25d0ae9f Reviewed-on: https://go-review.googlesource.com/c/158417 Reviewed-by: Ian Lance Taylor --- diff --git a/src/net/http/client.go b/src/net/http/client.go index ea6c071911..921f86bd92 100644 --- a/src/net/http/client.go +++ b/src/net/http/client.go @@ -478,10 +478,10 @@ func urlErrorOp(method string) string { // error. // // If the returned error is nil, the Response will contain a non-nil -// Body which the user is expected to close. If the Body is not -// closed, the Client's underlying RoundTripper (typically Transport) -// may not be able to re-use a persistent TCP connection to the server -// for a subsequent "keep-alive" request. +// Body which the user is expected to close. If the Body is not both +// read to EOF and closed, the Client's underlying RoundTripper +// (typically Transport) may not be able to re-use a persistent TCP +// connection to the server for a subsequent "keep-alive" request. // // The request Body, if non-nil, will be closed by the underlying // Transport, even on errors.