Skip to content

Commit

Permalink
fix while loop to and not for in language controller
Browse files Browse the repository at this point in the history
  • Loading branch information
jdeepee committed Jun 24, 2023
1 parent e611e82 commit ee9faab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions executor/src/core/LanguageController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit ee9faab

Please sign in to comment.