File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
extensions/github-authentication/src
src/vs/workbench/api/common Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ export function activate(context: vscode.ExtensionContext) {
69
69
70
70
let before = vscode . workspace . getConfiguration ( ) . get < string > ( 'github-enterprise.uri' ) ;
71
71
let githubEnterpriseAuthProvider = initGHES ( context , uriHandler ) ;
72
- context . subscriptions . push ( vscode . workspace . onDidChangeConfiguration ( async e => {
72
+ context . subscriptions . push ( vscode . workspace . onDidChangeConfiguration ( e => {
73
73
if ( e . affectsConfiguration ( 'github-enterprise.uri' ) ) {
74
74
const after = vscode . workspace . getConfiguration ( ) . get < string > ( 'github-enterprise.uri' ) ;
75
75
if ( before !== after ) {
Original file line number Diff line number Diff line change @@ -160,12 +160,17 @@ export class ExtHostAuthentication implements ExtHostAuthenticationShape {
160
160
return Promise . resolve ( ) ;
161
161
}
162
162
163
+ // Today, this only handles unregistering extensions that have disposables...
164
+ // so basiscally just the dynmaic ones. This was done to fix a bug where
165
+ // there was a racecondition between this event and re-registering a provider
166
+ // with the same id. (https://github.com/microsoft/vscode-copilot/issues/18045)
167
+ // This works for now, but should be cleaned up so theres one flow for register/unregister
163
168
$onDidUnregisterAuthenticationProvider ( id : string ) : Promise < void > {
164
169
const providerData = this . _authenticationProviders . get ( id ) ;
165
170
if ( providerData ?. disposable ) {
166
171
providerData . disposable . dispose ( ) ;
172
+ this . _authenticationProviders . delete ( id ) ;
167
173
}
168
- this . _authenticationProviders . delete ( id ) ;
169
174
return Promise . resolve ( ) ;
170
175
}
171
176
You can’t perform that action at this time.
0 commit comments