Skip to content

Commit

Permalink
catch update check exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
cenkalti committed Sep 3, 2020
1 parent fe2f87c commit 760f37d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,16 @@ app.on('ready', () => {
})

let checkingUpdate = false
function checkUpdate () {
async function checkUpdate () {
if (checkingUpdate) {
return
}
checkingUpdate = true
autoUpdater.checkForUpdates()
try {
await autoUpdater.checkForUpdates()
} catch (err) {
checkingUpdate = false
}
}

autoUpdater.logger = log
Expand Down

0 comments on commit 760f37d

Please sign in to comment.