Commit ccdc2863 authored by Matthew Holt's avatar Matthew Holt

httpserver: Remove unused ReadTimeout from tlsHelloListener

parent a2c410b8
...@@ -9,7 +9,6 @@ import ( ...@@ -9,7 +9,6 @@ import (
"net/http" "net/http"
"strings" "strings"
"sync" "sync"
"time"
) )
// tlsHandler is a http.Handler that will inject a value // tlsHandler is a http.Handler that will inject a value
...@@ -253,11 +252,10 @@ func parseRawClientHello(data []byte) (info rawHelloInfo) { ...@@ -253,11 +252,10 @@ func parseRawClientHello(data []byte) (info rawHelloInfo) {
} }
// newTLSListener returns a new tlsHelloListener that wraps ln. // newTLSListener returns a new tlsHelloListener that wraps ln.
func newTLSListener(ln net.Listener, config *tls.Config, readTimeout time.Duration) *tlsHelloListener { func newTLSListener(ln net.Listener, config *tls.Config) *tlsHelloListener {
return &tlsHelloListener{ return &tlsHelloListener{
Listener: ln, Listener: ln,
config: config, config: config,
readTimeout: readTimeout,
helloInfos: make(map[string]rawHelloInfo), helloInfos: make(map[string]rawHelloInfo),
} }
} }
...@@ -270,7 +268,6 @@ func newTLSListener(ln net.Listener, config *tls.Config, readTimeout time.Durati ...@@ -270,7 +268,6 @@ func newTLSListener(ln net.Listener, config *tls.Config, readTimeout time.Durati
type tlsHelloListener struct { type tlsHelloListener struct {
net.Listener net.Listener
config *tls.Config config *tls.Config
readTimeout time.Duration
helloInfos map[string]rawHelloInfo helloInfos map[string]rawHelloInfo
helloInfosMu sync.RWMutex helloInfosMu sync.RWMutex
} }
......
...@@ -247,7 +247,7 @@ func (s *Server) Serve(ln net.Listener) error { ...@@ -247,7 +247,7 @@ func (s *Server) Serve(ln net.Listener) error {
// not implement the File() method we need for graceful restarts // not implement the File() method we need for graceful restarts
// on POSIX systems. // on POSIX systems.
// TODO: Is this ^ still relevant anymore? Maybe we can now that it's a net.Listener... // TODO: Is this ^ still relevant anymore? Maybe we can now that it's a net.Listener...
ln = newTLSListener(ln, s.Server.TLSConfig, s.Server.ReadTimeout) ln = newTLSListener(ln, s.Server.TLSConfig)
if handler, ok := s.Server.Handler.(*tlsHandler); ok { if handler, ok := s.Server.Handler.(*tlsHandler); ok {
handler.listener = ln.(*tlsHelloListener) handler.listener = ln.(*tlsHelloListener)
} }
......
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