]> Cypherpunks repositories - gostls13.git/commitdiff
net/http: clarify Transport connection reuse docs a bit
authorBrad Fitzpatrick <bradfitz@golang.org>
Thu, 17 Jan 2019 23:22:47 +0000 (15:22 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 18 Jan 2019 02:38:08 +0000 (02:38 +0000)
Updates #26095 (or fixes it)

Change-Id: I92488dabe823b82e1ba534648fe6d63d25d0ae9f
Reviewed-on: https://go-review.googlesource.com/c/158417
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/net/http/client.go

index ea6c0719119b1ffebff4bc406a9e0d10918f18e3..921f86bd92dc742e18891837544787a034e11bb3 100644 (file)
@@ -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.