diff --git a/src/main/java/org/jboss/netty/channel/socket/nio/NioClientSocketPipelineSink.java b/src/main/java/org/jboss/netty/channel/socket/nio/NioClientSocketPipelineSink.java index 526bf1768a..d1a3f2758f 100644 --- a/src/main/java/org/jboss/netty/channel/socket/nio/NioClientSocketPipelineSink.java +++ b/src/main/java/org/jboss/netty/channel/socket/nio/NioClientSocketPipelineSink.java @@ -117,7 +117,8 @@ class NioClientSocketPipelineSink extends AbstractChannelSink { } else if (e instanceof MessageEvent) { MessageEvent event = (MessageEvent) e; NioSocketChannel channel = (NioSocketChannel) event.getChannel(); - channel.writeBuffer.offer(event); + boolean offered = channel.writeBuffer.offer(event); + assert offered; NioWorker.write(channel, true); } } @@ -217,7 +218,8 @@ class NioClientSocketPipelineSink extends AbstractChannelSink { assert selector != null && selector.isOpen(); started = true; - registerTaskQueue.offer(registerTask); + boolean offered = registerTaskQueue.offer(registerTask); + assert offered; } if (wakenUp.compareAndSet(false, true)) {