mirror of
https://github.com/YuJunZhiXue/dsh-purge.git
synced 2026-11-28 05:00:22 +08:00
fix(desktop): 重启脚本 inflight 窗口 180s 收到 45s
officialRestartScript() 末尾的 WScript.Sleep(180000) 持有 %TEMP%\dsh-purge-official-restarting,而 ASAR_RENAME_WHEN_IDLE_PS1 看到该标记且 age < 180 s 就 exit 0,不做换包。结果是重启完成后约三分钟内, 面板里的操作都没有响应。 冷启动用不到 180 s:桌面宿主从进程创建到插件 boot 完成实测约十几秒。 收到 45 s 仍留了足够余量覆盖较慢的冷启动。 如果 180 s 是有意留的更大余量,这一条可以不用。
This commit is contained in:
1 parent
e581245906
commit
c409843377
1 file changed
+3
-1
+3
-1
@@ -1309,7 +1309,9 @@ function officialRestartScript(exe, asar, dshHome) {
|
||||
"log('started');",
|
||||
"}",
|
||||
"}",
|
||||
"WScript.Sleep(180000);",
|
||||
// Keep the inflight window just long enough to cover a cold client start;
|
||||
// the original 180s left the panel unresponsive for 3 minutes after every restart.
|
||||
"WScript.Sleep(45000);",
|
||||
"try { if (fso.FileExists(" + jsString(path.join(os.tmpdir(), "dsh-purge-official-restarting")) + ")) fso.DeleteFile(" + jsString(path.join(os.tmpdir(), "dsh-purge-official-restarting")) + ", true); } catch (ignoreFlag) {}",
|
||||
"",
|
||||
].join("\r\n");
|
||||
|
||||
Reference in new issue
Block a user