]> Cypherpunks repositories - gostls13.git/commitdiff
net/http: fix SetKeepAlivesEnabled receiver name
authorCarl Jackson <carl@stripe.com>
Sat, 1 Aug 2015 06:25:48 +0000 (23:25 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Sun, 2 Aug 2015 08:34:04 +0000 (08:34 +0000)
This makes the receiver name consistent with the rest of the methods on
type Server.

Change-Id: Ic2a007d3b5eb50bd87030e15405e9856109cf590
Reviewed-on: https://go-review.googlesource.com/13035
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>

src/net/http/server.go

index 8c204fb648773ead7d62d18ba034a387b5b24a11..d12f696eafad91c6aa8daa4c4f08def975ad636b 100644 (file)
@@ -1884,11 +1884,11 @@ func (s *Server) doKeepAlives() bool {
 // By default, keep-alives are always enabled. Only very
 // resource-constrained environments or servers in the process of
 // shutting down should disable them.
-func (s *Server) SetKeepAlivesEnabled(v bool) {
+func (srv *Server) SetKeepAlivesEnabled(v bool) {
        if v {
-               atomic.StoreInt32(&s.disableKeepAlives, 0)
+               atomic.StoreInt32(&srv.disableKeepAlives, 0)
        } else {
-               atomic.StoreInt32(&s.disableKeepAlives, 1)
+               atomic.StoreInt32(&srv.disableKeepAlives, 1)
        }
 }