Flush in netty event loop

This commit is contained in:
themode 2021-03-26 08:37:47 +01:00
parent eb4a6baf8e
commit e9d76cc742

View File

@ -71,10 +71,12 @@ public class NettyPlayerConnection extends PlayerConnection {
@Override
public void update() {
// Flush
this.channel.eventLoop().submit(() -> {
if (channel.isActive()) {
writeWaitingPackets();
this.channel.flush();
}
});
// Network stats
super.update();
}