mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-12-24 17:47:41 +01:00
Wait 100ms before closing socket to give server time to process.
This commit is contained in:
parent
fa5804ec86
commit
0b7b87d9c3
@ -1,7 +1,10 @@
|
||||
package net.md_5.bungee;
|
||||
|
||||
import io.netty.channel.Channel;
|
||||
import io.netty.channel.ChannelFuture;
|
||||
import io.netty.channel.ChannelFutureListener;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.Setter;
|
||||
@ -37,7 +40,14 @@ public class ServerConnection implements Server
|
||||
if ( ch.isActive() )
|
||||
{
|
||||
ch.write( new PacketFFKick( reason ) );
|
||||
ch.close();
|
||||
ch.eventLoop().schedule( new Runnable()
|
||||
{
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
ch.close();
|
||||
}
|
||||
}, 100, TimeUnit.MILLISECONDS );
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user