Add delay for polling on error to prevent rapid retries

parent 9bb1a0b5
...@@ -468,9 +468,9 @@ function pollData() { ...@@ -468,9 +468,9 @@ function pollData() {
}) })
.catch(error => { .catch(error => {
console.error('Polling error:', error); console.error('Polling error:', error);
// Continue polling even on error // Continue polling even on error, but with delay
if (pollInterval) { if (pollInterval) {
pollInterval = setTimeout(pollData, 0); pollInterval = setTimeout(pollData, 1000);
} }
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment