Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33006031
D6683.1768362296.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
974 B
Referenced Files
None
Subscribers
None
D6683.1768362296.diff
View Options
diff --git a/desktop/src/auto-update.js b/desktop/src/auto-update.js
--- a/desktop/src/auto-update.js
+++ b/desktop/src/auto-update.js
@@ -10,13 +10,23 @@
// Check for new updates every 10 minutes
const updateIntervalMs = 10 * 60_000;
+ let updateCheckSchedule = null;
const scheduleCheckForUpdates = () => {
- setTimeout(() => autoUpdater.checkForUpdates(), updateIntervalMs);
+ if (updateCheckSchedule) {
+ clearInterval(updateCheckSchedule);
+ }
+ updateCheckSchedule = setInterval(
+ () => autoUpdater.checkForUpdates(),
+ updateIntervalMs,
+ );
};
scheduleCheckForUpdates();
- autoUpdater.on('update-not-available', scheduleCheckForUpdates);
+ autoUpdater.on('update-available', () => {
+ clearInterval(updateCheckSchedule);
+ updateCheckSchedule = null;
+ });
autoUpdater.on('update-downloaded', (event, releaseNotes, releaseName) => {
autoUpdater.setFeedURL({ url: getUpdateUrl(releaseName) });
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jan 14, 3:44 AM (1 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5930196
Default Alt Text
D6683.1768362296.diff (974 B)
Attached To
Mode
D6683: [desktop] Continue checking for updates even after an exception
Attached
Detach File
Event Timeline
Log In to Comment