Changes to connect messages, added some debug messages to narrow down server user handling bug.

This commit is contained in:
LevelX2 2014-04-14 23:11:34 +02:00
parent cf4913ae96
commit d53a3245d6
8 changed files with 63 additions and 31 deletions

View file

@ -317,18 +317,23 @@ public class User {
}
public void kill(DisconnectReason reason) {
for (GameSession session: gameSessions.values()) {
session.kill();
logger.debug("kill: kill game sessions");
for (GameSession gameSession: gameSessions.values()) {
gameSession.kill();
}
for (DraftSession session: draftSessions.values()) {
session.setKilled();
logger.debug("kill: kill draft sessions");
for (DraftSession draftSession: draftSessions.values()) {
draftSession.setKilled();
}
for (TournamentSession session: tournamentSessions.values()) {
session.setKilled();
logger.debug("kill: kill tournament sessions");
for (TournamentSession tournamentSession: tournamentSessions.values()) {
tournamentSession.setKilled();
}
logger.debug("kill: leave tables");
for (Entry<UUID, Table> entry: tables.entrySet()) {
TableManager.getInstance().leaveTable(userId, entry.getValue().getId());
}
logger.debug("kill: remove user from chat");
ChatManager.getInstance().removeUser(userId, reason);
}