[#2065] Fix NPE in AbstractOioByteChannel during write to the socket

This commit is contained in:
Norman Maurer 2013-12-15 11:41:04 +01:00
parent 48b416f112
commit 1a9eb05ba0

View File

@ -154,7 +154,10 @@ public abstract class AbstractOioByteChannel extends AbstractOioChannel {
protected void doWrite(ChannelOutboundBuffer in) throws Exception {
for (;;) {
Object msg = in.current(false);
if (msg == null) {
// nothing left to write
break;
}
if (msg instanceof ByteBuf) {
ByteBuf buf = (ByteBuf) msg;
while (buf.isReadable()) {