Skip to content

Commit

Permalink
fix bad state change in darwin update service
Browse files Browse the repository at this point in the history
  • Loading branch information
joaomoreno committed Jan 23, 2018
1 parent 3ecae53 commit f3ffbcf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/vs/platform/update/electron-main/updateService.darwin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,17 @@ export class DarwinUpdateService extends AbstractUpdateService {
@ILogService logService: ILogService
) {
super(lifecycleService, configurationService, environmentService, logService);
this.onRawError(this.logService.error, this.logService, this.disposables);
this.onRawError(this.onError, this, this.disposables);
this.onRawUpdateAvailable(this.onUpdateAvailable, this, this.disposables);
this.onRawUpdateDownloaded(this.onUpdateDownloaded, this, this.disposables);
this.onRawUpdateNotAvailable(this.onUpdateNotAvailable, this, this.disposables);
}

private onError(err: string): void {
this.logService.error('UpdateService error: ', err);
this.setState(State.Idle);
}

protected setUpdateFeedUrl(quality: string): boolean {
try {
electron.autoUpdater.setFeedURL(createUpdateURL('darwin', quality));
Expand Down

0 comments on commit f3ffbcf

Please sign in to comment.