Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32611449
D6683.1767449617.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.1767449617.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
@@ -11,13 +11,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
Sat, Jan 3, 2:13 PM (5 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5889175
Default Alt Text
D6683.1767449617.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