From 0dcd4d14e0ec8b3778a7d851f9aa46c2e6916b1d Mon Sep 17 00:00:00 2001 From: Brennan Date: Wed, 5 Oct 2022 16:27:29 -0700 Subject: [PATCH] Fix grpc benchmark cancellation (#1901) --- perf/benchmarkapps/GrpcClient/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/perf/benchmarkapps/GrpcClient/Program.cs b/perf/benchmarkapps/GrpcClient/Program.cs index e41d4e3a9..3d5002768 100644 --- a/perf/benchmarkapps/GrpcClient/Program.cs +++ b/perf/benchmarkapps/GrpcClient/Program.cs @@ -639,7 +639,7 @@ private static async Task ServerStreamingCall(CancellationTokenSource cts, int c var client = new BenchmarkService.BenchmarkServiceClient(_channels[connectionId]); var callOptions = CreateCallOptions(); - callOptions.WithCancellationToken(cts.Token); + callOptions = callOptions.WithCancellationToken(cts.Token); using var call = client.StreamingFromServer(CreateSimpleRequest(), callOptions); while (!cts.IsCancellationRequested)