Fix infinite callbacks in Azure Resource Explorer (#3780)

This commit is contained in:
Karl Burtram
2019-01-22 15:22:45 -08:00
committed by GitHub
parent 2e98fde053
commit 2b5265c103
4 changed files with 66 additions and 6 deletions

View File

@@ -90,12 +90,9 @@ export class AzureResourceAccountTreeNode extends AzureResourceContainerTreeNode
}
} catch (error) {
if (error instanceof AzureResourceCredentialError) {
this.appContext.apiWrapper.showErrorMessage(error.message);
this.appContext.apiWrapper.executeCommand('azure.resource.signin');
} else {
return [AzureResourceMessageTreeNode.create(AzureResourceErrorMessageUtil.getErrorMessage(error), this)];
}
return [AzureResourceMessageTreeNode.create(AzureResourceErrorMessageUtil.getErrorMessage(error), this)];
}
}

View File

@@ -32,7 +32,7 @@ export class AzureResourceTreeProvider implements TreeDataProvider<TreeNode>, IA
return element.getChildren(true);
}
if (!this.isSystemInitialized) {
if (!this.isSystemInitialized && !this._loadingTimer) {
this._loadingTimer = setInterval(async () => {
try {
// Call sqlops.accounts.getAllAccounts() to determine whether the system has been initialized.