Wait to retry on error.

feature/long-poll-status
Daniel Perelman 4 years ago
parent 44402c3907
commit 9411b21d0f

@ -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