From fbdf39a6ad15734121f356916cd280a0c401a537 Mon Sep 17 00:00:00 2001 From: Eugene Auduchinok Date: Tue, 28 Jan 2025 21:24:58 +0900 Subject: [PATCH] Update src/Compiler/Utilities/Cancellable.fs Co-authored-by: Tomas Grosup --- src/Compiler/Utilities/Cancellable.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Compiler/Utilities/Cancellable.fs b/src/Compiler/Utilities/Cancellable.fs index 661dc44519b..ad739b5039e 100644 --- a/src/Compiler/Utilities/Cancellable.fs +++ b/src/Compiler/Utilities/Cancellable.fs @@ -69,7 +69,7 @@ module Cancellable = use _ = Cancellable.UsingToken(ct) oper ct with - | :? OperationCanceledException as e when e.CancellationToken = ct -> ValueOrCancelled.Cancelled e + | :? OperationCanceledException as e when ct.IsCancellationRequested -> ValueOrCancelled.Cancelled e | :? OperationCanceledException as e -> InvalidOperationException("Wrong cancellation token", e) |> raise let fold f acc seq =