Commit a3c1a867 authored by Tim Heckman's avatar Tim Heckman Committed by Brad Fitzpatrick

net/http: fix unclosed Listener leak in ListenAndServeTLS

Fixes #23002

Change-Id: I87e72833757497aff49117dd40629cb7ec49e6e7
Reviewed-on: https://go-review.googlesource.com/81955Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent eb441e6d
......@@ -2998,6 +2998,8 @@ func (srv *Server) ListenAndServeTLS(certFile, keyFile string) error {
return err
}
defer ln.Close()
return srv.ServeTLS(tcpKeepAliveListener{ln.(*net.TCPListener)}, certFile, keyFile)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment