reverse cancellation and sequencer (#237029)

When we cancel, then the promise should be cancelled. If we don't do this, we hang on the first interaction request until we timeout.

Fixes the 2nd point in https://github.com/microsoft/vscode/issues/236825#issuecomment-2563882150
pull/237173/head
Tyler James Leonhardt 2024-12-28 03:36:05 -05:00 committed by GitHub
parent 0a66dc39ff
commit 1410d77f6f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -133,11 +133,11 @@ export class CachedPublicClientApplication implements ICachedPublicClientApplica
cancellable: true,
title: l10n.t('Signing in to Microsoft...')
},
(_process, token) => raceCancellationAndTimeoutError(
this._sequencer.queue(() => this._pca.acquireTokenInteractive(request)),
(_process, token) => this._sequencer.queue(() => raceCancellationAndTimeoutError(
this._pca.acquireTokenInteractive(request),
token,
1000 * 60 * 5
)
))
);
// this._setupRefresh(result);
if (this._isBrokerAvailable) {