• Brad Fitzpatrick's avatar
    net/http: add Transport.IdleConnTimeout · abc1472d
    Brad Fitzpatrick authored
    Don't keep idle HTTP client connections open forever. Add a new knob,
    Transport.IdleConnTimeout, and make the default be 90 seconds. I
    figure 90 seconds is more than a minute, and less than infinite, and I
    figure enough code has things waking up once a minute polling APIs.
    
    This also removes the Transport's idleCount field which was unused and
    redundant with the size of the idleLRU map (which was actually used).
    
    Change-Id: Ibb698a9a9a26f28e00a20fe7ed23f4afb20c2322
    Reviewed-on: https://go-review.googlesource.com/22670Reviewed-by: 's avatarAndrew Gerrand <adg@golang.org>
    Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    abc1472d
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...