Skip to content

Commit

Permalink
fix while loop to and instead of or
Browse files Browse the repository at this point in the history
  • Loading branch information
jdeepee committed Jun 23, 2023
1 parent bbe4bc3 commit 4d9e308
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 4d9e308

Please sign in to comment.