Disable packet grouping in an attempt to increase reliability.

This commit is contained in:
md_5 2013-07-31 20:18:54 +10:00
parent 8f961c9d4e
commit 911f08d52c
2 changed files with 1 additions and 17 deletions

View File

@ -12,7 +12,6 @@ public class ChannelWrapper
private final Channel ch;
@Getter
private volatile boolean closed;
private boolean flushNow = true;
public ChannelWrapper(ChannelHandlerContext ctx)
{
@ -23,23 +22,10 @@ public class ChannelWrapper
{
if ( !closed )
{
ch.write( packet );
if ( flushNow )
{
ch.flush();
}
ch.writeAndFlush( packet );
}
}
public synchronized void flushNow(boolean flush)
{
if ( !flushNow && flush )
{
ch.flush();
}
this.flushNow = flush;
}
public synchronized void close()
{
if ( !closed )

View File

@ -69,7 +69,6 @@ public class HandlerBoss extends ChannelInboundHandlerAdapter
@Override
public void channelReadComplete(ChannelHandlerContext ctx) throws Exception
{
channel.flushNow( false );
while ( !msgs.isEmpty() )
{
Object msg = msgs.remove();
@ -95,7 +94,6 @@ public class HandlerBoss extends ChannelInboundHandlerAdapter
}
}
}
channel.flushNow( true );
}
@Override