Skip to content
Permalink
Browse files

fix(electron): handle autoupdate errors

Fix #2070
  • Loading branch information...
mrfelton committed Apr 22, 2019
1 parent 55b1e9e commit 062d805435b5c8e75c93d7329c30f39d98883c14
Showing with 8 additions and 4 deletions.
  1. +8 −4 electron/updater.js
@@ -53,10 +53,14 @@ class ZapUpdater {
this.initAutoUpdate()
}

initAutoUpdate() {
autoUpdater.checkForUpdates()
const oneHour = 60 * 60 * 1000
setInterval(() => autoUpdater.checkForUpdates(), oneHour)
async initAutoUpdate() {
try {
await autoUpdater.checkForUpdates()
const oneHour = 60 * 60 * 1000
setInterval(() => autoUpdater.checkForUpdates(), oneHour)
} catch (error) {
updaterLog.warn('Cannot check for updates', error.message)
}
}
}

0 comments on commit 062d805

Please sign in to comment.
You can’t perform that action at this time.