Commit da6a097d authored by Guilherme Rezende's avatar Guilherme Rezende

adding crypto/tls sessioncache

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