From 40c4d8447799bfd7bfd1e6d6a3b5621692422958 Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Wed, 15 Apr 2009 07:41:25 +0000 Subject: [PATCH] Fixed NPE on interruption --- .../jboss/netty/channel/socket/http/HttpTunnelWorker.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/jboss/netty/channel/socket/http/HttpTunnelWorker.java b/src/main/java/org/jboss/netty/channel/socket/http/HttpTunnelWorker.java index 14f1b618d4..32df188139 100644 --- a/src/main/java/org/jboss/netty/channel/socket/http/HttpTunnelWorker.java +++ b/src/main/java/org/jboss/netty/channel/socket/http/HttpTunnelWorker.java @@ -72,9 +72,9 @@ final class HttpTunnelWorker implements Runnable { break; } - ChannelBuffer buffer = ChannelBuffers.wrappedBuffer(buf); - - fireMessageReceived(channel, buffer); + if (buf != null) { + fireMessageReceived(channel, ChannelBuffers.wrappedBuffer(buf)); + } } // Setting the workerThread to null will prevent any channel