From ee9faab39a5b82327e2bb87090dc15c69fd37653 Mon Sep 17 00:00:00 2001 From: Joshua Parkin Date: Fri, 23 Jun 2023 21:53:38 -0700 Subject: [PATCH] fix while loop to and not for in language controller --- executor/src/core/LanguageController.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/executor/src/core/LanguageController.ts b/executor/src/core/LanguageController.ts index 420c87b69..ada0bdfc6 100644 --- a/executor/src/core/LanguageController.ts +++ b/executor/src/core/LanguageController.ts @@ -375,14 +375,14 @@ export default class LanguageController { // We need to get the meta from the language language // Retry 10 times with increasing delay to account for Holochain sync let retries = 0; - while (!languageMeta || retries < 10) { + while (!languageMeta && retries < 10) { try { languageMeta = await this.getLanguageExpression(address) } catch (e) { console.error(`Error getting language meta from language language: ${e}\nRetrying...`) } retries++; - await new Promise(r => setTimeout(r, 5000 * retries)); + await new Promise(r => setTimeout(r, 5000 * retries)); } } if (languageMeta == null) {