Fix compile error in example introduced by bad cherry-pick of c9d6d365397a11f520079690752302e8d37fca76

This commit is contained in:
Norman Maurer 2021-07-28 09:41:12 +02:00
parent c9d6d36539
commit 564c8c3f7c

View File

@ -67,7 +67,7 @@ public final class TcpDnsServer {
ch.pipeline().addLast(new TcpDnsQueryDecoder(), new TcpDnsResponseEncoder(), ch.pipeline().addLast(new TcpDnsQueryDecoder(), new TcpDnsResponseEncoder(),
new SimpleChannelInboundHandler<DnsQuery>() { new SimpleChannelInboundHandler<DnsQuery>() {
@Override @Override
protected void channelRead0(ChannelHandlerContext ctx, protected void messageReceived(ChannelHandlerContext ctx,
DnsQuery msg) throws Exception { DnsQuery msg) throws Exception {
DnsQuestion question = msg.recordAt(DnsSection.QUESTION); DnsQuestion question = msg.recordAt(DnsSection.QUESTION);
System.out.println("Query domain: " + question); System.out.println("Query domain: " + question);
@ -122,7 +122,8 @@ public final class TcpDnsServer {
.addLast(new TcpDnsResponseDecoder()) .addLast(new TcpDnsResponseDecoder())
.addLast(new SimpleChannelInboundHandler<DefaultDnsResponse>() { .addLast(new SimpleChannelInboundHandler<DefaultDnsResponse>() {
@Override @Override
protected void channelRead0(ChannelHandlerContext ctx, DefaultDnsResponse msg) { protected void messageReceived(
ChannelHandlerContext ctx, DefaultDnsResponse msg) {
try { try {
handleQueryResp(msg); handleQueryResp(msg);
} finally { } finally {