Add a missing lock to cluster handler

This commit is contained in:
Jeff Mitchell 2019-07-09 03:46:08 -04:00
parent 7144450211
commit ff40dd30e0
1 changed files with 2 additions and 0 deletions

View File

@ -134,7 +134,9 @@ func (cl *Listener) StopHandler(alpn string) {
// Handler returns the handler for the provided ALPN name
func (cl *Listener) Handler(alpn string) (Handler, bool) {
cl.l.RLock()
handler, ok := cl.handlers[alpn]
cl.l.RUnlock()
return handler, ok
}