From 2b63d2d0cdee700b299b258bb0aeb46b07e6c335 Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Tue, 21 Jan 2014 07:34:30 +0100 Subject: [PATCH] Make sure we not leak messages in the SPDY example --- .../main/java/io/netty/example/spdy/SpdyServerHandler.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/example/src/main/java/io/netty/example/spdy/SpdyServerHandler.java b/example/src/main/java/io/netty/example/spdy/SpdyServerHandler.java index 889796fb31..3a431306ab 100644 --- a/example/src/main/java/io/netty/example/spdy/SpdyServerHandler.java +++ b/example/src/main/java/io/netty/example/spdy/SpdyServerHandler.java @@ -20,8 +20,8 @@ import java.util.Date; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; import io.netty.channel.ChannelFutureListener; -import io.netty.channel.ChannelHandlerAdapter; import io.netty.channel.ChannelHandlerContext; +import io.netty.channel.SimpleChannelInboundHandler; import io.netty.handler.codec.http.DefaultFullHttpResponse; import io.netty.handler.codec.http.FullHttpResponse; import io.netty.handler.codec.http.HttpRequest; @@ -35,14 +35,14 @@ import static io.netty.handler.codec.http.HttpVersion.*; /** * HTTP handler that responds with a "Hello World" */ -public class SpdyServerHandler extends ChannelHandlerAdapter { +public class SpdyServerHandler extends SimpleChannelInboundHandler { @Override public void channelReadComplete(ChannelHandlerContext ctx) { ctx.flush(); } @Override - public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { + public void messageReceived(ChannelHandlerContext ctx, Object msg) throws Exception { if (msg instanceof HttpRequest) { HttpRequest req = (HttpRequest) msg;