If backend status query has failed due to unknown error code 0, set a delayed retry until success.
This commit is contained in:
@@ -38,6 +38,8 @@ import * as sshctl from "./control/ssh.js";
|
|||||||
import * as xhr from "./xhr.js";
|
import * as xhr from "./xhr.js";
|
||||||
import * as cipher from "./crypto.js";
|
import * as cipher from "./crypto.js";
|
||||||
|
|
||||||
|
const backendQueryRetryDelay = 2000;
|
||||||
|
|
||||||
const maxTimeDiff = 30000;
|
const maxTimeDiff = 30000;
|
||||||
|
|
||||||
const mainTemplate = `
|
const mainTemplate = `
|
||||||
@@ -204,6 +206,12 @@ function startApp(rootEl) {
|
|||||||
this.page = "auth";
|
this.page = "auth";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 0:
|
||||||
|
setTimeout(() => {
|
||||||
|
this.tryInitialAuth();
|
||||||
|
}, backendQueryRetryDelay);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
alert("Unexpected backend query status: " + result.result);
|
alert("Unexpected backend query status: " + result.result);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user