Add timeouts to XhttpGet requests

This commit is contained in:
logicog committed 2025-10-22 08:05:44 +02:00
1 parent ba902a68d4
commit e5f5955f71
3 files changed
+7 -23

No files matched your search

+2 -2
View File
@@ -51,10 +51,10 @@ function update() {
}
};
xhttp.open("GET", "/status.json", true);
xhttp.send();
xhttp.timeout = 5000; xhttp.send();
}
window.addEventListener("load", function() {
update();
const interval = setInterval(update, 1000);
const interval = setInterval(update, 2000);
});