Merge pull request #14087 from jtattermusch/dispose_requestcallcontextpool

Dispose RequestCallContextPool on environment shutdown
pull/14090/head
Mehrdad Afshari 7 years ago committed by GitHub
commit 4721b5f265
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      src/csharp/Grpc.Core/GrpcEnvironment.cs

@ -381,6 +381,7 @@ namespace Grpc.Core
await Task.Run(() => ShuttingDown?.Invoke(this, null)).ConfigureAwait(false); await Task.Run(() => ShuttingDown?.Invoke(this, null)).ConfigureAwait(false);
await threadPool.StopAsync().ConfigureAwait(false); await threadPool.StopAsync().ConfigureAwait(false);
requestCallContextPool.Dispose();
batchContextPool.Dispose(); batchContextPool.Dispose();
GrpcNativeShutdown(); GrpcNativeShutdown();
isShutdown = true; isShutdown = true;

Loading…
Cancel
Save