We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1089677 commit df23617Copy full SHA for df23617
App/Services/CredentialManager.cs
@@ -220,8 +220,14 @@ private async Task<CredentialModel> LoadCredentialsInner(CancellationToken ct)
220
// we just return that instead.
221
using (await _opLock.LockAsync(ct))
222
{
223
+ ct.ThrowIfCancellationRequested();
224
+
225
+ // _latestCredentials will be set if we were preempted.
226
var latestCreds = _latestCredentials;
227
if (latestCreds != null) return latestCreds;
228
229
+ // Prevent new LoadCredentials calls from returning this task since
230
+ // it's pretty much done.
231
if (_loadCts != null)
232
233
_loadCts.Dispose();
0 commit comments