adding crypto/tls sessioncache

This commit is contained in:
Guilherme Rezende 2015-05-05 00:25:29 -03:00
parent 2dbd14b6dc
commit da6a097dcc

View File

@ -132,6 +132,9 @@ func ListenAndServeTLSWithSNI(srv *http.Server, tlsConfigs []TLSConfig) error {
}
config.BuildNameToCertificate()
// Add a session cache LRU algorithm with default capacity (64)
config.ClientSessionCache = tls.NewLRUClientSessionCache(0)
conn, err := net.Listen("tcp", addr)
if err != nil {
return err