Use newer writeAndFlush method
This commit is contained in:
parent
828e45651e
commit
db266a8484
@ -184,8 +184,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
+ '\u00a7' + legacy.getPlayers().getMax();
|
||||
}
|
||||
|
||||
ch.getHandle().writeAndFlush( kickMessage );
|
||||
ch.close();
|
||||
ch.close( kickMessage );
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -54,12 +54,11 @@ public class ChannelWrapper
|
||||
if ( packet instanceof PacketWrapper )
|
||||
{
|
||||
( (PacketWrapper) packet ).setReleased( true );
|
||||
ch.write( ( (PacketWrapper) packet ).buf, ch.voidPromise() );
|
||||
ch.writeAndFlush( ( (PacketWrapper) packet ).buf, ch.voidPromise() );
|
||||
} else
|
||||
{
|
||||
ch.write( packet, ch.voidPromise() );
|
||||
ch.writeAndFlush( packet, ch.voidPromise() );
|
||||
}
|
||||
ch.flush();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user