Skip to content

Commit

Permalink
Fixed leak reproduced by HttpServerTests.testIssue1978H2WithDelay.
Browse files Browse the repository at this point in the history
The Http2StreamBridgeServerHandler.channelRead method was still using old ReferenceCountUtil.release() instead of Resource.dispose() method.
  • Loading branch information
pderop authored and violetagg committed Sep 21, 2022
1 parent f695631 commit 63a7012
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -29,7 +29,7 @@
import io.netty5.handler.codec.http.LastHttpContent;
import io.netty5.handler.codec.http2.Http2StreamFrameToHttpObjectCodec;
import io.netty5.handler.ssl.SslHandler;
import io.netty5.util.ReferenceCountUtil;
import io.netty5.util.Resource;
import io.netty5.util.concurrent.Future;
import io.netty5.util.concurrent.FutureContextListener;
import reactor.core.publisher.Mono;
Expand Down Expand Up @@ -125,7 +125,7 @@ else if (!pendingResponse) {
HttpServerOperations.log.debug(format(ctx.channel(), "Dropped HTTP content, " +
"since response has been sent already: {}"), msg);
}
ReferenceCountUtil.release(msg);
Resource.dispose(msg);
ctx.read();
return;
}
Expand Down

0 comments on commit 63a7012

Please sign in to comment.