Skip to content

Commit c5c07d6

Browse files
committed
Revert "Check correct CancellationToken"
This reverts commit d76f5c5.
1 parent 6006454 commit c5c07d6

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
@@ -110,6 +110,11 @@ public void CancelUpdates()
110110

111111
private async Task UpdateWorkspaceStateAsync(Project? workspaceProject, IProjectSnapshot projectSnapshot, CancellationToken cancellationToken)
112112
{
113+
if (_disposeTokenSource.IsCancellationRequested)
114+
{
115+
return;
116+
}
117+
113118
try
114119
{
115120
// Only allow a single TagHelper resolver request to process at a time in order to reduce
@@ -191,7 +196,7 @@ await _projectManager
191196

192197
// Prevent ObjectDisposedException if we've disposed before we got here. The dispose method will release
193198
// anyway, so we're all good.
194-
if (!cancellationToken.IsCancellationRequested)
199+
if (!_disposeTokenSource.IsCancellationRequested)
195200
{
196201
_logger.LogTrace($"Releasing the semaphore, for '{projectSnapshot.Key}'");
197202
_semaphore.Release();

0 commit comments

Comments
 (0)