From b466c93c989529e7c7c99b9d3b4d9022764d0f69 Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Tue, 9 Jul 2019 03:46:08 -0400 Subject: [PATCH] Add a missing lock to cluster handler --- vault/cluster/cluster.go | 2 ++ 1 file changed, 2 insertions(+) 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 }