update boot timeout
This commit is contained in:
@@ -91,11 +91,18 @@ const exposeContext = async () => {
|
|||||||
let deviceId = await ipcRenderer.invoke("device:id");
|
let deviceId = await ipcRenderer.invoke("device:id");
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
/**
|
||||||
|
* Если после определенного таймаута приложение так и
|
||||||
|
* не загрузилось, то считаем, что процесс завис,
|
||||||
|
* и показываем экран ошибки. Так же отправляем
|
||||||
|
* сигнал в main процесс, чтобы тот мог попытаться
|
||||||
|
* откатить обновление.
|
||||||
|
*/
|
||||||
if(document.body.innerHTML.length < 100){
|
if(document.body.innerHTML.length < 100){
|
||||||
document.body.innerHTML = applicationError;
|
document.body.innerHTML = applicationError;
|
||||||
ipcRenderer.invoke("report-boot-process-failed");
|
ipcRenderer.invoke("report-boot-process-failed");
|
||||||
}
|
}
|
||||||
}, 3000);
|
}, 5000);
|
||||||
|
|
||||||
let downloadsPath = await ipcRenderer.invoke("get-downloads-path");
|
let downloadsPath = await ipcRenderer.invoke("get-downloads-path");
|
||||||
if (process.contextIsolated) {
|
if (process.contextIsolated) {
|
||||||
|
|||||||
Reference in New Issue
Block a user