Disable packet grouping in an attempt to increase reliability.
This commit is contained in:
parent
8f961c9d4e
commit
911f08d52c
@ -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 )
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user