From 323a8349882f092d85c09ef0921132439b8ee026 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Wed, 30 Oct 2024 23:55:57 +0100 Subject: [PATCH] chore: add rlock on get operation Signed-off-by: Valery Piashchynski --- internal.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal.go b/internal.go index e379bdf..8f76ce4 100644 --- a/internal.go +++ b/internal.go @@ -146,6 +146,9 @@ func (p *Plugin) initTemporalClient(phpSdkVersion string, flags map[string]strin }, Credentials: tclient.NewAPIKeyDynamicCredentials(func(context.Context) (string, error) { + p.mu.RLock() + defer p.mu.RUnlock() + return p.apiKey, nil }), }