Skip to content

Commit

Permalink
netty: Release SendGrpcFrameCommand when stream is missing
Browse files Browse the repository at this point in the history
`sendGrpcFrame` owns the buffer in `SendGrpcFrameCommand`. If the frame is not handed off to netty, it needs to be released in the method.

#11115
  • Loading branch information
benjaminp committed Apr 19, 2024
1 parent 8a21afc commit 309aa3b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions netty/src/main/java/io/grpc/netty/NettyServerHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,7 @@ private void sendGrpcFrame(
int streamId = cmd.stream().id();
Http2Stream stream = connection().stream(streamId);
if (stream == null) {
cmd.release();
streamGone(streamId, promise);
return;
}
Expand Down

0 comments on commit 309aa3b

Please sign in to comment.