mirror of
https://github.com/hashicorp/vault.git
synced 2025-11-25 20:51:43 +01:00
Add a missing lock to cluster handler
This commit is contained in:
parent
f76f82814e
commit
b466c93c98
@ -134,7 +134,9 @@ func (cl *Listener) StopHandler(alpn string) {
|
|||||||
|
|
||||||
// Handler returns the handler for the provided ALPN name
|
// Handler returns the handler for the provided ALPN name
|
||||||
func (cl *Listener) Handler(alpn string) (Handler, bool) {
|
func (cl *Listener) Handler(alpn string) (Handler, bool) {
|
||||||
|
cl.l.RLock()
|
||||||
handler, ok := cl.handlers[alpn]
|
handler, ok := cl.handlers[alpn]
|
||||||
|
cl.l.RUnlock()
|
||||||
return handler, ok
|
return handler, ok
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user