Skip to content

Commit 497f71a

Browse files
committed
Revert "Check correct CancellationToken"
This reverts commit d76f5c5.
1 parent 2c422fe commit 497f71a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/ProjectWorkspaceStateGenerator.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@ public void CancelUpdates()
109109

110110
private async Task UpdateWorkspaceStateAsync(Project? workspaceProject, IProjectSnapshot projectSnapshot, CancellationToken cancellationToken)
111111
{
112+
if (_disposeTokenSource.IsCancellationRequested)
113+
{
114+
return;
115+
}
116+
112117
try
113118
{
114119
// Only allow a single TagHelper resolver request to process at a time in order to reduce
@@ -172,7 +177,7 @@ await _projectManager
172177
{
173178
// Prevent ObjectDisposedException if we've disposed before we got here. The dispose method will release
174179
// anyway, so we're all good.
175-
if (!cancellationToken.IsCancellationRequested)
180+
if (!_disposeTokenSource.IsCancellationRequested)
176181
{
177182
_semaphore.Release();
178183
}

0 commit comments

Comments
 (0)