]> Cypherpunks repositories - gostls13.git/commit
net/http: use TCP keep-alives for ListenAndServe and ListenAndServeTLS
authorBrad Fitzpatrick <bradfitz@golang.org>
Thu, 9 Jan 2014 23:05:09 +0000 (15:05 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 9 Jan 2014 23:05:09 +0000 (15:05 -0800)
commitd6bce32a3607222075734bf4363ca3fea02ea1e5
tree627eee30c94ef97fe9093553b7f02e7cc646dff9
parent8da8b37674732ca4532dabcabe7f495b3d6455e9
net/http: use TCP keep-alives for ListenAndServe and ListenAndServeTLS

Our default behavior for the common cases shouldn't lead to
leaked TCP connections (e.g. from people closing laptops) when
their Go servers are exposed to the open Internet without a
proxy in front.

Too many users on golang-nuts have learned this the hard way.

No API change. Only ListenAndServe and ListenAndServeTLS are
updated.

R=golang-codereviews, cespare, gobot, rsc, minux.ma
CC=golang-codereviews
https://golang.org/cl/48300043
src/pkg/net/http/server.go