Commit 541c38b7 authored by zhaodice's avatar zhaodice Committed by Melledy
Browse files

Avoid disconnection notification

parent b5fd8c1a
...@@ -12,6 +12,17 @@ public class HandlerPlayerForceExitReq extends PacketHandler { ...@@ -12,6 +12,17 @@ public class HandlerPlayerForceExitReq extends PacketHandler {
public void handle(GameSession session, byte[] header, byte[] payload) throws Exception { public void handle(GameSession session, byte[] header, byte[] payload) throws Exception {
// Client should auto disconnect right now // Client should auto disconnect right now
session.send(new BasePacket(PacketOpcodes.PlayerForceExitRsp)); 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();
} }
} }
Markdown is supported
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