Prevent simultaneous refreshes when restoring auth info (#7835)

* Prevent multiple simultaneos refreshes when retrieving auth info

* Add changeset

* refactor
This commit is contained in:
Tomás Barreiro authored and GitHub committed 2025-12-04 14:45:10 +01:00
1 parent 74808431e5
commit 2ffdc50ea1
2 files changed
+11

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
---
"claude-dev": patch
---
Prevent simultaneuos refreshes when restoring auth info
+6
View File
@@ -351,6 +351,12 @@ export class AuthService {
throw new Error("Auth provider is not set")
}
// If a refresh is already in progress, wait for it to complete
if (this._refreshPromise) {
Logger.info("Token refresh already in progress, waiting for completion")
await this._refreshPromise
}
return this._provider.retrieveClineAuthInfo(this._controller)
}