Skip to content

Commit

Permalink
fix(auto-updater): Race condition during Application Quit (#2746)
Browse files Browse the repository at this point in the history
Close #2745
  • Loading branch information
MariaDima authored and develar committed Mar 26, 2018
1 parent 5f0dd86 commit 1df5d98
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 1df5d98

Please sign in to comment.