I am sorry. This logic has changed in the past a few times and I am out of date.

I think the current logic is

io.Copy(ioutil.Discard, resp.Body); resp.Body.Close() // connection
will be reused
resp.Body.Close() // remaining body will be discarded, and the
connection will _not_ be reused.
On Thu, Dec 11, 2014 at 1:39 AM, James Bardin wrote:
On Wed, Dec 10, 2014 at 9:34 AM, Chandru wrote:

Am I reading it wrong?

No, you are correct. Some of the body may be read into a buffer, but there's
no guarantee how much.
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 6 of 11 | next ›
Discussion Overview
groupgolang-nuts @
postedDec 10, '14 at 1:46p
activeAug 24, '15 at 6:41p



site design / logo © 2021 Grokbase