Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Commit 546952d

Browse files
author
MikhailArkhipov
committed
Move cancellation check higher
1 parent 515cbc2 commit 546952d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/LanguageServer/Impl/Implementation/EditorFiles.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ public async Task DidChangeTextDocument(DidChangeTextDocumentParams @params, boo
112112

113113
var toVersion = @params.textDocument.version ?? (fromVersion + changes.Length);
114114

115+
cancellationToken.ThrowIfCancellationRequested();
115116
doc.UpdateDocument(part, new DocumentChangeSet(
116117
fromVersion,
117118
toVersion,
@@ -122,7 +123,6 @@ public async Task DidChangeTextDocument(DidChangeTextDocumentParams @params, boo
122123
})
123124
));
124125

125-
cancellationToken.ThrowIfCancellationRequested();
126126
DidChangeTextDocumentParams? next = null;
127127
lock (_pendingChanges) {
128128
var notExpired = _pendingChanges

0 commit comments

Comments
 (0)