chore: change lock to Rlock (#14867)

This commit is contained in:
Marko 2023-02-01 12:40:34 +01:00 committed by GitHub
parent d2e23d0ff3
commit 811f12edb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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")