mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-29 04:53:33 +01:00
Fix #109609, auth dialog can't be shown again after cancel
This commit is contained in:
@@ -73,6 +73,17 @@ export class ExtHostAuthentication implements ExtHostAuthenticationShape {
|
||||
|
||||
inFlightRequests.push(inFlightRequest);
|
||||
this._inFlightRequests.set(extensionId, inFlightRequests);
|
||||
|
||||
try {
|
||||
await session;
|
||||
} finally {
|
||||
const requestIndex = inFlightRequests.findIndex(request => request.scopes === sortedScopes);
|
||||
if (requestIndex > -1) {
|
||||
inFlightRequests.splice(requestIndex);
|
||||
this._inFlightRequests.set(extensionId, inFlightRequests);
|
||||
}
|
||||
}
|
||||
|
||||
return session;
|
||||
}
|
||||
}
|
||||
@@ -117,12 +128,6 @@ export class ExtHostAuthentication implements ExtHostAuthenticationShape {
|
||||
}
|
||||
}
|
||||
|
||||
const inFlightRequests = this._inFlightRequests.get(extensionId) || [];
|
||||
const requestIndex = inFlightRequests.findIndex(request => request.scopes === scopes.sort().join(' '));
|
||||
if (requestIndex > -1) {
|
||||
inFlightRequests.splice(requestIndex);
|
||||
this._inFlightRequests.set(extensionId, inFlightRequests);
|
||||
}
|
||||
|
||||
return session;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user