Skip to content
Snippets Groups Projects
Commit 541c38b7 authored by zhaodice's avatar zhaodice Committed by Melledy
Browse files

Avoid disconnection notification

parent b5fd8c1a
Branches
Tags
No related merge requests found
......@@ -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();
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment