From f78afb7af28b2feeb46849048f52f2a8f234259c Mon Sep 17 00:00:00 2001 From: operagxsasha Date: Tue, 21 Apr 2026 08:17:30 +0300 Subject: [PATCH] fix: use RLock/RUnlock in codec() read method --- encoding.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/encoding.go b/encoding.go index 8178c42e3..2f5fc108a 100644 --- a/encoding.go +++ b/encoding.go @@ -151,8 +151,8 @@ func (r *DefaultCodecRegistry) Decoder(format string) (Decoder, error) { } func (r *DefaultCodecRegistry) codec(format string) (Codec, bool) { - r.mu.Lock() - defer r.mu.Unlock() + r.mu.RLock() + defer r.mu.RUnlock() format = strings.ToLower(format)