ce6931e0e5
buffer leak in EpollSocketChannelTest
Motivation:
ce6931e0e5
introduced a buffer leak in EpollSocketChannelTest.
Modifications:
- Fix buffer leak
Result:
No more buffer leak.
This commit is contained in:
parent
e01630f48e
commit
386c42bfb9
@ -26,6 +26,7 @@ import io.netty.channel.ChannelOption;
|
||||
import io.netty.channel.ChannelPipeline;
|
||||
import io.netty.channel.EventLoopGroup;
|
||||
import io.netty.channel.ServerChannel;
|
||||
import io.netty.util.ReferenceCountUtil;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
@ -182,6 +183,7 @@ public class EpollSocketChannelTest {
|
||||
private static class BuggyChannelHandler extends ChannelInboundHandlerAdapter {
|
||||
@Override
|
||||
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
|
||||
ReferenceCountUtil.release(msg);
|
||||
throw new NullPointerException("I am a bug!");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user