Resume the app token exchanger (#2209)

This commit is contained in:
ノエルの犬
2023-06-17 02:27:14 +08:00
committed by GitHub
parent e382c6d691
commit c3339de184
4 changed files with 11 additions and 13 deletions

View File

@@ -149,8 +149,7 @@ public class GameSession implements GameSessionManager.KcpChannel {
@Override
public void handleReceive(byte[] bytes) {
// Decrypt and turn back into a packet
if (this.getState() != SessionState.WAITING_FOR_TOKEN)
Crypto.xor(bytes, useSecretKey() ? Crypto.ENCRYPT_KEY : Crypto.DISPATCH_KEY);
Crypto.xor(bytes, useSecretKey() ? Crypto.ENCRYPT_KEY : Crypto.DISPATCH_KEY);
ByteBuf packet = Unpooled.wrappedBuffer(bytes);
// Log