Skip to content

Commit 2115532

Browse files
committed
return if already closed
1 parent ec6d2f4 commit 2115532

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/config/service_account.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ func getConfig(clientID, clientSecret, baseURL string) *clientcredentials.Config
7373
func CloseTokenSource() {
7474
saInfo.mu.Lock()
7575
defer saInfo.mu.Unlock()
76+
if saInfo.closed {
77+
return
78+
}
7679
saInfo.closed = true
7780
if saInfo.tokenSource == nil { // No need to do anything if SA was not initialized.
7881
return

0 commit comments

Comments
 (0)