fix(session): separate forced disconnects from resume parking

Add a forced dispose path for bans, RCON disconnects, logout/account endpoints, plugin-cancelled login, duplicate login replacement, and late MAC-ban enforcement. Soft channel closes still park a session for reconnect, while security-driven closes now bypass session resume. Also null-guard client/channel disposal and cover the contract with focused tests.
This commit is contained in:
simoleo89
2026-06-09 22:02:07 +02:00
parent d984461cc0
commit 5c0f2d2855
9 changed files with 59 additions and 13 deletions
@@ -0,0 +1,22 @@
package com.eu.habbo.habbohotel.gameclients;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
class GameClientManagerContractTest {
@Test
void exposesExplicitForcedDisposePath() {
assertDoesNotThrow(() -> GameClient.class.getDeclaredMethod("dispose", boolean.class));
assertDoesNotThrow(() -> GameClientManager.class.getDeclaredMethod("forceDisposeClient", GameClient.class));
}
@Test
void disposeMethodsIgnoreNullClient() {
GameClientManager manager = new GameClientManager();
assertDoesNotThrow(() -> manager.disposeClient(null));
assertDoesNotThrow(() -> manager.forceDisposeClient(null));
}
}