mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-08-30 14:52:51 +08:00
Add timeouts to XhttpGet requests
This commit is contained in:
+2
-2
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user