diff --git a/src/csharp/GrpcCore/ServerCallHandler.cs b/src/csharp/GrpcCore/ServerCallHandler.cs index 73dfa52def8..48d1eaa3359 100644 --- a/src/csharp/GrpcCore/ServerCallHandler.cs +++ b/src/csharp/GrpcCore/ServerCallHandler.cs @@ -109,12 +109,28 @@ namespace Google.GRPC.Core asyncCall.InitializeServer(call); - var finishedTask = asyncCall.ServerSideUnaryRequestCallAsync(); + var finishedTask = asyncCall.ServerSideStreamingRequestCallAsync(new NullObserver()); asyncCall.SendStatusFromServerAsync(new Status(StatusCode.GRPC_STATUS_UNIMPLEMENTED, "No such method.")).Wait(); finishedTask.Wait(); } } + + internal class NullObserver : IObserver + { + public void OnCompleted() + { + } + + public void OnError(Exception error) + { + } + + public void OnNext(T value) + { + } + + } } diff --git a/src/csharp/GrpcCoreTests/ClientServerTest.cs b/src/csharp/GrpcCoreTests/ClientServerTest.cs index 37d770e0c04..d0e357e29a6 100644 --- a/src/csharp/GrpcCoreTests/ClientServerTest.cs +++ b/src/csharp/GrpcCoreTests/ClientServerTest.cs @@ -85,8 +85,6 @@ namespace Google.GRPC.Core.Tests } server.ShutdownAsync().Wait(); - - GrpcEnvironment.Shutdown(); } [Test]