From 811f12edb0cb2df1f970c0598f9a48dab9a5adf2 Mon Sep 17 00:00:00 2001 From: Marko Date: Wed, 1 Feb 2023 12:40:34 +0100 Subject: [PATCH] chore: change lock to Rlock (#14867) --- types/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/config.go b/types/config.go index fce6c73526..826e6652bc 100644 --- a/types/config.go +++ b/types/config.go @@ -74,8 +74,8 @@ func GetSealedConfig(ctx context.Context) (*Config, error) { } func (config *Config) assertNotSealed() { - config.mtx.Lock() - defer config.mtx.Unlock() + config.mtx.RLock() + defer config.mtx.RUnlock() if config.sealed { panic("Config is sealed")