Fix potential hang when canceling ts requests using pipe. Part of #24698

This commit is contained in:
Matt Bierner 2017-05-23 15:41:06 -07:00
parent a2a0c3287c
commit 066db6b85f

View file

@ -910,6 +910,13 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient
return true;
} catch (e) {
// noop
} finally {
const p = this.callbacks[seq];
if (p) {
delete this.callbacks[seq];
this.pendingResponses--;
p.e(new Error(`Cancelled Request ${seq}`));
}
}
}