Browse Source

Wait to retry on error.

feature/long-poll-status
Daniel Perelman 1 year ago
parent
commit
9411b21d0f
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      fear_tracker/templates/game.html

+ 4
- 3
fear_tracker/templates/game.html View File

@@ -392,9 +392,10 @@
statusObj = data;
}
})
.catch(() => {})
.then(() => {
checkStatus();
.then(checkStatus)
.catch(() => {
// If something went wrong, wait a few seconds before retrying.
setTimeout(checkStatus, 5000);
});
}
checkStatus();


Loading…
Cancel
Save