From 48d07366c1663d922308ecbe4955f8ef5d3279c8 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Wed, 23 Mar 2016 16:51:17 +0100 Subject: Fix volume --- main.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'main.go') diff --git a/main.go b/main.go index e54cd96..63df66e 100644 --- a/main.go +++ b/main.go @@ -30,6 +30,7 @@ type Entry struct { } func (r Route) SNI(h *tls.ClientHelloInfo) (*tls.Certificate, error) { + log.Println("request cert for", h.ServerName) if e, ok := r[h.ServerName]; ok && e.Cert != nil { return e.Cert, nil } @@ -37,6 +38,7 @@ func (r Route) SNI(h *tls.ClientHelloInfo) (*tls.Certificate, error) { } func (r Route) Restore() { + // FIXME assignment copies lock value to *mux: net/http.ServeMux contains sync.RWMutex *mux = *http.NewServeMux() for _, e := range route { e.NewHandle() -- cgit v1.2.3