Give delayed close packets time to send on /end
This commit is contained in:
parent
6104354fa1
commit
c1bdbef9cf
@ -391,6 +391,13 @@ public class BungeeCord extends ProxyServer
|
|||||||
connectionLock.readLock().unlock();
|
connectionLock.readLock().unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Thread.sleep( 500 );
|
||||||
|
} catch ( InterruptedException ex )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
getLogger().info( "Closing IO threads" );
|
getLogger().info( "Closing IO threads" );
|
||||||
eventLoops.shutdownGracefully();
|
eventLoops.shutdownGracefully();
|
||||||
try
|
try
|
||||||
|
@ -75,7 +75,7 @@ public class ChannelWrapper
|
|||||||
|
|
||||||
// Minecraft client can take some time to switch protocols.
|
// Minecraft client can take some time to switch protocols.
|
||||||
// Sending the wrong disconnect packet whilst a protocol switch is in progress will crash it.
|
// 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()
|
ch.eventLoop().schedule( new Runnable()
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -90,7 +90,7 @@ public class ChannelWrapper
|
|||||||
ChannelWrapper.this.close();
|
ChannelWrapper.this.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 500, TimeUnit.MILLISECONDS );
|
}, 250, TimeUnit.MILLISECONDS );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user