Skip to content

Commit

Permalink
netty: Release SendGrpcFrameCommand when stream is missing (#11116)
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 22, 2024
1 parent 77e59b2 commit fb9a108
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 fb9a108

Please sign in to comment.