Skip to content

Commit

Permalink
when saving expect the extension host to be virtually dead, #14635
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed Nov 1, 2016
1 parent 14fd47b commit 9e7d700
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/vs/workbench/api/node/mainThreadSaveParticipant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,15 @@ class ExtHostSaveParticipant implements INamedSaveParticpant {
}

participate(editorModel: ITextFileEditorModel, env: { reason: SaveReason }): TPromise<any> {
return this._proxy.$participateInSave(editorModel.getResource(), env.reason).then(values => {
for (const success of values) {
if (!success) {
return TPromise.wrapError('listener failed');
return new TPromise<any>((resolve, reject) => {
setTimeout(reject, 1750);
this._proxy.$participateInSave(editorModel.getResource(), env.reason).then(values => {
for (const success of values) {
if (!success) {
return TPromise.wrapError('listener failed');
}
}
}
}).then(resolve, reject);
});
}
}
Expand Down

0 comments on commit 9e7d700

Please sign in to comment.