From 803592679a5cf47f1de9a197f5ae45bad36e0e43 Mon Sep 17 00:00:00 2001 From: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> Date: Sun, 24 Mar 2024 13:51:58 +0200 Subject: [PATCH] mutex protect Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --- go/vt/vttablet/grpctmclient/client.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/go/vt/vttablet/grpctmclient/client.go b/go/vt/vttablet/grpctmclient/client.go index ca55ec7d521..45ba031b23c 100644 --- a/go/vt/vttablet/grpctmclient/client.go +++ b/go/vt/vttablet/grpctmclient/client.go @@ -188,6 +188,8 @@ func (client *grpcClient) dialPool(ctx context.Context, dialPoolGroup DialPoolGr if err == nil { return } + client.mu.Lock() + defer client.mu.Unlock() m[addr].cc.Close() delete(m, addr) }