From ec4d06e47010ef5a7a69080046530997169e7666 Mon Sep 17 00:00:00 2001 From: Carl Jackson Date: Fri, 31 Jul 2015 23:25:48 -0700 Subject: [PATCH] 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 --- src/net/http/server.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) } } -- 2.50.0