Add a missing lock to cluster handler

This commit is contained in:
Jeff Mitchell 2019-07-09 03:46:08 -04:00
parent f76f82814e
commit b466c93c98

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
}