mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 02:33:53 -06:00
Fix Per Request Cancellation Tokens
While working on https://github.com/Microsoft/vscode/pull/22437, I believe there is a bug in the per request cancellation in the `setRequest` function on the line `currentRequestId = currentRequestId ;` This causes `currentRequestId` to always be undefined Fix is to assign the `currentRequestId` to `requestId`
This commit is contained in:
parent
8f41444769
commit
7ea8d9fa49
@ -48,7 +48,7 @@ function createCancellationToken(args: string[]): ServerCancellationToken {
|
||||
return {
|
||||
isCancellationRequested: () => perRequestPipeName !== undefined && pipeExists(perRequestPipeName),
|
||||
setRequest(requestId: number) {
|
||||
currentRequestId = currentRequestId;
|
||||
currentRequestId = requestId;
|
||||
perRequestPipeName = namePrefix + requestId;
|
||||
},
|
||||
resetRequest(requestId: number) {
|
||||
@ -67,4 +67,4 @@ function createCancellationToken(args: string[]): ServerCancellationToken {
|
||||
};
|
||||
}
|
||||
}
|
||||
export = createCancellationToken;
|
||||
export = createCancellationToken;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user