[#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 e965318398
commit e136227ee6

View File

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