Fixed infinite loop in pollUntilComplete

This commit is contained in:
Richard 2021-03-24 13:25:54 +00:00
parent 024f2566f0
commit 9d81a80bbb

View file

@ -236,7 +236,7 @@ export default {
// axios.get
// FIXME: this could be an infinite loop if the task is cancelled/errored
let r = response;
while (r.data.status == "active") {
while (r.data.status == "running" | r.data.status == "pending") {
await new Promise(resolve => setTimeout(resolve, 100));
r = await axios.get(r.data.href);
}