Skip to content

Commit

Permalink
add returns for client onHeadersRead early rejects.
Browse files Browse the repository at this point in the history
  • Loading branch information
ran-su committed Oct 25, 2024
1 parent 3ad0492 commit 2d3b4b3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions netty/src/main/java/io/grpc/netty/NettyClientHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -410,13 +410,15 @@ 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(
String.format(
"Server Headers of size %d exceeded Metadata size soft limit: %d",
h2HeadersSize,
softLimitHeaderListSize)), true, new Metadata());
return;
}
stream.transportHeadersReceived(headers, endStream);
}
Expand Down

0 comments on commit 2d3b4b3

Please sign in to comment.