Skip to content

Commit

Permalink
gRPC Channel is disposed of after use (#16432)
Browse files Browse the repository at this point in the history
  • Loading branch information
arialdomartini authored and JamesNK committed Jan 7, 2020
1 parent d955f05 commit 006afe0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Program
static async Task Main(string[] args)
{
// The port number(5001) must match the port of the gRPC server.
var channel = GrpcChannel.ForAddress("https://localhost:5001");
using var channel = GrpcChannel.ForAddress("https://localhost:5001");
var client = new Greeter.GreeterClient(channel);
var reply = await client.SayHelloAsync(
new HelloRequest { Name = "GreeterClient" });
Expand Down

0 comments on commit 006afe0

Please # to comment.