未验证 提交 5e39ff81 编写于 作者: A Anmol Sethi

vscode: Fix update check timeouts

Forgot an extra 60 in the check interval and the notification timeout.
Very unfortunate. Check has been allowed every 168 minutes instead of
every week.
上级 3e221091
......@@ -769,7 +769,7 @@ index 096b9e23493539c9937940a56e555d95bbae38d9..ef37e614004f550f7b64eacd362f6894
remove(key: string, scope: StorageScope): void {
diff --git a/src/vs/server/browser/client.ts b/src/vs/server/browser/client.ts
new file mode 100644
index 0000000000000000000000000000000000000000..bae5b43e07e33b24ed5cc62d39c6b929c0bc4e5f
index 0000000000000000000000000000000000000000..bfc5f4d0c8bd7f6b9c4456f36b3b734c07859a60
--- /dev/null
+++ b/src/vs/server/browser/client.ts
@@ -0,0 +1,241 @@
......@@ -947,7 +947,7 @@ index 0000000000000000000000000000000000000000..bae5b43e07e33b24ed5cc62d39c6b929
+ const lastNoti = storageService.getNumber("csLastUpdateNotification", StorageScope.GLOBAL);
+ if (lastNoti) {
+ // Only remind them again after 1 week.
+ const timeout = 1000*60*24*7;
+ const timeout = 1000*60*60*24*7;
+ const threshold = lastNoti + timeout;
+ if (Date.now() < threshold) {
+ return;
......@@ -966,7 +966,7 @@ index 0000000000000000000000000000000000000000..bae5b43e07e33b24ed5cc62d39c6b929
+ logService.debug(`failed to check for update: ${error}`);
+ }).finally(() => {
+ // Check again every 6 hours.
+ setTimeout(updateLoop, 1000*60*6);
+ setTimeout(updateLoop, 1000*60*60*6);
+ });
+ };
+
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册