Give delayed close packets time to send on /end

This commit is contained in:
md_5 2017-01-16 10:00:27 +11:00
parent 6104354fa1
commit c1bdbef9cf
2 changed files with 9 additions and 2 deletions

View File

@ -391,6 +391,13 @@ public class BungeeCord extends ProxyServer
connectionLock.readLock().unlock();
}
try
{
Thread.sleep( 500 );
} catch ( InterruptedException ex )
{
}
getLogger().info( "Closing IO threads" );
eventLoops.shutdownGracefully();
try

View File

@ -75,7 +75,7 @@ public class ChannelWrapper
// Minecraft client can take some time to switch protocols.
// Sending the wrong disconnect packet whilst a protocol switch is in progress will crash it.
// Delay 500ms to ensure that the protocol switch (if any) has definitely taken place.
// Delay 250ms to ensure that the protocol switch (if any) has definitely taken place.
ch.eventLoop().schedule( new Runnable()
{
@ -90,7 +90,7 @@ public class ChannelWrapper
ChannelWrapper.this.close();
}
}
}, 500, TimeUnit.MILLISECONDS );
}, 250, TimeUnit.MILLISECONDS );
}
}