netty: Release SendGrpcFrameCommand when stream is missing (#11116)

`sendGrpcFrame` owns the buffer in `SendGrpcFrameCommand`. If the frame is not handed off to netty, it needs to be released in the method.

https://github.com/grpc/grpc-java/issues/11115
This commit is contained in:
Benjamin Peterson 2024-04-22 10:27:39 -07:00 committed by GitHub
parent 77e59b29dd
commit fb9a10809f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -748,6 +748,7 @@ class NettyServerHandler extends AbstractNettyHandler {
int streamId = cmd.stream().id(); int streamId = cmd.stream().id();
Http2Stream stream = connection().stream(streamId); Http2Stream stream = connection().stream(streamId);
if (stream == null) { if (stream == null) {
cmd.release();
streamGone(streamId, promise); streamGone(streamId, promise);
return; return;
} }