From d97010de424f2e393134ab491d4217c092de2559 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6llner?= Date: Fri, 23 Aug 2019 21:41:32 +0200 Subject: [PATCH] Troubleshooting ReleaseOnCancelClient, 2nd attempt --- Capnp.Net.Runtime.Tests/TcpRpcInterop.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Capnp.Net.Runtime.Tests/TcpRpcInterop.cs b/Capnp.Net.Runtime.Tests/TcpRpcInterop.cs index 4156687..4abb6a6 100644 --- a/Capnp.Net.Runtime.Tests/TcpRpcInterop.cs +++ b/Capnp.Net.Runtime.Tests/TcpRpcInterop.cs @@ -332,9 +332,15 @@ namespace Capnp.Net.Runtime.Tests try { t.Result.Dispose(); + // Scenario 1: Cancellation happened after computing the answer, but before client-side completion. } catch (TaskCanceledException) { + // Scenario 2: Cancellation happened before or while computing the answer. + } + catch (ObjectDisposedException) + { + // Scenario 3: Cancellation happened after computing the answer, and after client-side completion. } })); }