From b3c5f2b6123eb655458fcae28bf2acf543f7490f Mon Sep 17 00:00:00 2001 From: elandau Date: Wed, 17 Jul 2019 14:19:17 -0700 Subject: [PATCH] Add back releasing limit in gRPC's onCancel --- .../grpc/server/ConcurrencyLimitServerInterceptor.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/concurrency-limits-grpc/src/main/java/com/netflix/concurrency/limits/grpc/server/ConcurrencyLimitServerInterceptor.java b/concurrency-limits-grpc/src/main/java/com/netflix/concurrency/limits/grpc/server/ConcurrencyLimitServerInterceptor.java index d82b0800..dde8b34f 100644 --- a/concurrency-limits-grpc/src/main/java/com/netflix/concurrency/limits/grpc/server/ConcurrencyLimitServerInterceptor.java +++ b/concurrency-limits-grpc/src/main/java/com/netflix/concurrency/limits/grpc/server/ConcurrencyLimitServerInterceptor.java @@ -202,6 +202,16 @@ public void onHalfClose() { throw t; } } + + @Override + public void onCancel() { + try { + super.onCancel(); + } finally { + safeComplete(listener::onDropped); + } + } + }; } })