Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
ponderingdemocritus committed Dec 10, 2024
1 parent 39ac47d commit 549f68f
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions client/src/three/systems/SystemManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,21 @@ export class SystemManager {
return;
}

// let retries = 0;
// const tryGetUpdate = () => {
// const value = getUpdate(update);
// if (value) {
// callback(value);
// return;
// }

// retries++;
// if (retries < maxRetries) {
// setTimeout(tryGetUpdate, retryDelay);
// }
// };

// setTimeout(tryGetUpdate, retryDelay);
let retries = 0;
const tryGetUpdate = () => {
const value = getUpdate(update);
if (value) {
callback(value);
return;
}

retries++;
if (retries < maxRetries) {
setTimeout(tryGetUpdate, retryDelay);
}
};

setTimeout(tryGetUpdate, retryDelay);
};

defineComponentSystem(this.setup.network.world, component, handleUpdate, { runOnInit });
Expand Down

0 comments on commit 549f68f

Please sign in to comment.