diff --git a/vault/cluster/cluster.go b/vault/cluster/cluster.go index b618383cfa..2e6de3dfbb 100644 --- a/vault/cluster/cluster.go +++ b/vault/cluster/cluster.go @@ -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 }