Skip to content

Commit

Permalink
net/http: fix SetKeepAlivesEnabled receiver name
Browse files Browse the repository at this point in the history
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 <[email protected]>
Run-TryBot: Brad Fitzpatrick <[email protected]>
  • Loading branch information
carl-stripe authored and bradfitz committed Aug 2, 2015
1 parent 02d7448 commit ec4d06e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/net/http/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down

0 comments on commit ec4d06e

Please sign in to comment.