diff --git a/src/main/java/org/jboss/netty/channel/socket/http/HttpTunnelingClientSocketChannel.java b/src/main/java/org/jboss/netty/channel/socket/http/HttpTunnelingClientSocketChannel.java index efb8ed1f8e..28ba85199e 100644 --- a/src/main/java/org/jboss/netty/channel/socket/http/HttpTunnelingClientSocketChannel.java +++ b/src/main/java/org/jboss/netty/channel/socket/http/HttpTunnelingClientSocketChannel.java @@ -292,11 +292,9 @@ class HttpTunnelingClientSocketChannel extends AbstractChannel if (setClosed()) { // Send the end of chunk. synchronized (writeLock) { - channel.write(HttpChunk.LAST_CHUNK).awaitUninterruptibly(); + channel.write(HttpChunk.LAST_CHUNK).addListener(ChannelFutureListener.CLOSE); } - closed = true; - channel.close(); } }