mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Update servermanager.ts
This commit is contained in:
parent
8ef86e75f0
commit
e7845dd356
@ -164,7 +164,8 @@ export class ServerManager {
|
||||
xmlHttp.onreadystatechange = (res) => {
|
||||
if (xmlHttp.readyState == 4 && xmlHttp.status === 0) {
|
||||
console.error("An error occurred during the XMLHttpRequest");
|
||||
this.setConnected(false);
|
||||
if (this.#failedRequestEpoch === null) this.#failedRequestEpoch = Date.now();
|
||||
else if (Date.now() - this.#failedRequestEpoch > 10000) this.setConnected(false);
|
||||
errorCallback && errorCallback(xmlHttp.status);
|
||||
}
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user