mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-30 08:32:06 +00:00
Avoid disconnection notification
This commit is contained in:
parent
0bb2c6af38
commit
7ac73229da
@ -12,6 +12,17 @@ public class HandlerPlayerForceExitReq extends PacketHandler {
|
||||
public void handle(GameSession session, byte[] header, byte[] payload) throws Exception {
|
||||
// Client should auto disconnect right now
|
||||
session.send(new BasePacket(PacketOpcodes.PlayerForceExitRsp));
|
||||
session.close();
|
||||
new Thread(){
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
Thread.sleep(1000);// disconnect after 1 seconds
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
session.close();
|
||||
super.run();
|
||||
}
|
||||
}.start();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user