diff --git a/netty/src/main/java/io/grpc/netty/NettyClientHandler.java b/netty/src/main/java/io/grpc/netty/NettyClientHandler.java index 8639f7aa5c7..194decb1120 100644 --- a/netty/src/main/java/io/grpc/netty/NettyClientHandler.java +++ b/netty/src/main/java/io/grpc/netty/NettyClientHandler.java @@ -410,6 +410,7 @@ private void onHeadersRead(int streamId, Http2Headers headers, boolean endStream "Server Status + Trailers of size %d exceeded Metadata size soft limit: %d", h2HeadersSize, softLimitHeaderListSize)), true, new Metadata()); + return; } else if (shouldFail) { stream.transportReportStatus(Status.RESOURCE_EXHAUSTED .withDescription( @@ -417,6 +418,7 @@ private void onHeadersRead(int streamId, Http2Headers headers, boolean endStream "Server Headers of size %d exceeded Metadata size soft limit: %d", h2HeadersSize, softLimitHeaderListSize)), true, new Metadata()); + return; } stream.transportHeadersReceived(headers, endStream); }