Skip to content

Commit

Permalink
mutex protect
Browse files Browse the repository at this point in the history
Signed-off-by: Shlomi Noach <[email protected]>
  • Loading branch information
shlomi-noach committed Mar 24, 2024
1 parent 2df2144 commit 8035926
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions go/vt/vttablet/grpctmclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 8035926

Please sign in to comment.