mirror of
https://github.com/golang/go.git
synced 2025-05-28 02:41:30 +00:00
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:
parent
a9a580690b
commit
41d860cf0e
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user