From 8be02a728fd6b5f5b4a9c99266061c77eafb1278 Mon Sep 17 00:00:00 2001 From: Libo Huang Date: Tue, 16 Jan 2024 10:54:21 +0800 Subject: [PATCH] BUG/MEDIUM: parser: fix: concurrent map writes --- configuration/configuration.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configuration/configuration.go b/configuration/configuration.go index cd077125..ff4688ef 100644 --- a/configuration/configuration.go +++ b/configuration/configuration.go @@ -152,7 +152,9 @@ func (c *client) DeleteParser(transactionID string) error { if !ok { return NewConfError(ErrTransactionDoesNotExist, transactionID) } + c.clientMu.Lock() delete(c.parsers, transactionID) + c.clientMu.Unlock() return nil }