net/http: remove unused named return variables

The existing implementation names a c net.Conn return which is
never user. Leaving the returns unamed is marginally clearer.

Change-Id: If9a411c9235b78c116a8ffb21fef71f7a4a4ce8f
Reviewed-on: https://go-review.googlesource.com/66890
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
mattyw 2017-09-28 11:12:16 -04:00 committed by Brad Fitzpatrick
parent a9a580690b
commit 41d860cf0e

View File

@ -3161,10 +3161,10 @@ type tcpKeepAliveListener struct {
*net.TCPListener
}
func (ln tcpKeepAliveListener) Accept() (c net.Conn, err error) {
func (ln tcpKeepAliveListener) Accept() (net.Conn, error) {
tc, err := ln.AcceptTCP()
if err != nil {
return
return nil, err
}
tc.SetKeepAlive(true)
tc.SetKeepAlivePeriod(3 * time.Minute)