From: Carl Jackson Date: Sat, 1 Aug 2015 06:25:48 +0000 (-0700) Subject: net/http: fix SetKeepAlivesEnabled receiver name X-Git-Tag: go1.5rc1~55 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=ec4d06e47010ef5a7a69080046530997169e7666;p=gostls13.git net/http: fix SetKeepAlivesEnabled receiver name 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 Run-TryBot: Brad Fitzpatrick --- diff --git a/src/net/http/server.go b/src/net/http/server.go index 8c204fb648..d12f696eaf 100644 --- a/src/net/http/server.go +++ b/src/net/http/server.go @@ -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) } }