Skip to content

Commit

Permalink
fix(auto-updater): Race condition during Application Quit
Browse files Browse the repository at this point in the history
  • Loading branch information
MariaDima committed Mar 26, 2018
1 parent 5f0dd86 commit 3b4800b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/electron-updater/src/BaseUpdater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ export abstract class BaseUpdater extends AppUpdater {
if (this.app.quit !== undefined) {
this.app.quit()
}
this.quitAndInstallCalled = false
})
} else {
this.quitAndInstallCalled = false
}
}

Expand Down Expand Up @@ -136,6 +137,8 @@ export abstract class BaseUpdater extends AppUpdater {
if (!this.quitAndInstallCalled) {
this._logger.info("Auto install update on quit")
await this.install(true, false)
} else {
this._logger.info("Update installer has already been triggered. Quitting application.")
}
})
}
Expand Down

0 comments on commit 3b4800b

Please sign in to comment.