Control xhttp concurrency

This commit is contained in:
logicog
2026-03-10 06:16:18 +01:00
parent c2f5a91763
commit fa37940075
10 changed files with 106 additions and 45 deletions
+6 -2
View File
@@ -130,10 +130,14 @@ function getL2() {
}
};
xhttp.open("GET", "/l2.json?idx=" + l2CurrentEntry, true);
xhttp.timeout = 1500; xhttp.send();
xhttp.timeout = 1500; sendXHTTP(xhttp);
}
window.addEventListener("load", function() {
l2GetInterval = setInterval(getL2, 1000);
update( () => {
getL2();
const interval = setInterval(update, 2000);
l2GetInterval = setInterval(getL2, 1000);
});;
});