Remove redundant scheduled close, already channel closed by future.

This commit is contained in:
md_5 2020-01-14 19:06:14 +11:00
parent 22d2cd3388
commit 85ea4c165b

View File

@ -81,14 +81,6 @@ public class ChannelWrapper
if ( packet != null && ch.isActive() ) if ( packet != null && ch.isActive() )
{ {
ch.writeAndFlush( packet ).addListeners( ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE, ChannelFutureListener.CLOSE ); ch.writeAndFlush( packet ).addListeners( ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE, ChannelFutureListener.CLOSE );
ch.eventLoop().schedule( new Runnable()
{
@Override
public void run()
{
ch.close();
}
}, 250, TimeUnit.MILLISECONDS );
} else } else
{ {
ch.flush(); ch.flush();