diff --git a/example/src/main/java/io/netty/example/http2/helloworld/multiplex/server/HelloWorldHttp2Handler.java b/example/src/main/java/io/netty/example/http2/helloworld/multiplex/server/HelloWorldHttp2Handler.java index 5e2ad9fa6b..2aaedc539e 100644 --- a/example/src/main/java/io/netty/example/http2/helloworld/multiplex/server/HelloWorldHttp2Handler.java +++ b/example/src/main/java/io/netty/example/http2/helloworld/multiplex/server/HelloWorldHttp2Handler.java @@ -76,7 +76,7 @@ public class HelloWorldHttp2Handler extends ChannelDuplexHandler { throws Exception { if (headers.isEndStream()) { ByteBuf content = ctx.alloc().buffer(); - content.writeBytes(RESPONSE_BYTES); + content.writeBytes(RESPONSE_BYTES.duplicate()); ByteBufUtil.writeAscii(content, " - via HTTP/2"); sendResponse(ctx, content); }