aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2016-03-23 16:51:17 +0100
committerDimitri Sokolyuk <demon@dim13.org>2016-03-23 16:51:17 +0100
commit48d07366c1663d922308ecbe4955f8ef5d3279c8 (patch)
treed666047120c5dc6e4bb297142f340ed9a5e8e6b0 /main.go
parent62fa5c31ba39ebf968f98a7ee46525f14c0ea97c (diff)
Fix volume
Diffstat (limited to 'main.go')
-rw-r--r--main.go2
1 files changed, 2 insertions, 0 deletions
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()