Skip to content

Commit c600199

Browse files
benjaminpejona86
authored andcommitted
netty: Release SendGrpcFrameCommand when stream is missing (grpc#11116)
`sendGrpcFrame` owns the buffer in `SendGrpcFrameCommand`. If the frame is not handed off to netty, it needs to be released in the method. grpc#11115
1 parent c7cf329 commit c600199

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

netty/src/main/java/io/grpc/netty/NettyServerHandler.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -749,6 +749,7 @@ private void sendGrpcFrame(
749749
int streamId = cmd.stream().id();
750750
Http2Stream stream = connection().stream(streamId);
751751
if (stream == null) {
752+
cmd.release();
752753
streamGone(streamId, promise);
753754
return;
754755
}

0 commit comments

Comments
 (0)