From f6909b259fc327aeefefe4164afe2e8d13cee21c Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 21 Mar 2018 12:08:17 +0100 Subject: [PATCH] fix a test --- src/csharp/Grpc.Core/Channel.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/csharp/Grpc.Core/Channel.cs b/src/csharp/Grpc.Core/Channel.cs index d4fcd1ad9c2..abe19a6fc69 100644 --- a/src/csharp/Grpc.Core/Channel.cs +++ b/src/csharp/Grpc.Core/Channel.cs @@ -163,9 +163,8 @@ namespace Grpc.Core if (handle.IsClosed) { // If channel has been already shutdown and handle was disposed, we would end up with - // an abandoned completion added to the completion registry. So we act as if the - // wait has timed out instead. - tcs.SetResult(false); + // an abandoned completion added to the completion registry. Instead, we make sure we fail early. + throw new ObjectDisposedException(nameof(handle), "Channel handle has already been disposed."); } else {