mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
* Some changes to logging.
This commit is contained in:
parent
abc441a4ba
commit
d337e2cc13
3 changed files with 16 additions and 8 deletions
|
|
@ -327,23 +327,23 @@ public class User {
|
|||
}
|
||||
|
||||
public void kill(DisconnectReason reason) {
|
||||
logger.debug("start user kill");
|
||||
logger.debug("user.kill before game session " + gameSessions.size() );
|
||||
for (GameSession gameSession: gameSessions.values()) {
|
||||
gameSession.kill();
|
||||
}
|
||||
logger.debug("user kill after game");
|
||||
logger.debug("user.kill before draft session " + draftSessions.size());
|
||||
for (DraftSession draftSession: draftSessions.values()) {
|
||||
draftSession.setKilled();
|
||||
}
|
||||
logger.debug("user kill after draft");
|
||||
logger.debug("user.kill before tournament session " + tournamentSessions.size());
|
||||
for (TournamentSession tournamentSession: tournamentSessions.values()) {
|
||||
tournamentSession.setKilled();
|
||||
}
|
||||
logger.debug("user kill after tournament");
|
||||
logger.debug("user.kill before tables " + tables.size());
|
||||
for (Entry<UUID, Table> entry: tables.entrySet()) {
|
||||
TableManager.getInstance().leaveTable(userId, entry.getValue().getId());
|
||||
}
|
||||
logger.debug("user kill after table");
|
||||
logger.debug("user.kill before chat remove user");
|
||||
ChatManager.getInstance().removeUser(userId, reason);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -149,7 +149,15 @@ public class TournamentController {
|
|||
|
||||
public synchronized void join(UUID userId) {
|
||||
UUID playerId = userPlayerMap.get(userId);
|
||||
if (playerId == null) {
|
||||
logger.error("join: got no playerId for userId: " + userId + " for tournament " + tournament.getId());
|
||||
return;
|
||||
}
|
||||
TournamentSession tournamentSession = new TournamentSession(tournament, userId, tableId, playerId);
|
||||
if (tournamentSessions == null) {
|
||||
logger.error("join: got no playerId for userId: " + userId + " for tournament " + tournament.getId());
|
||||
return;
|
||||
}
|
||||
tournamentSessions.put(playerId, tournamentSession);
|
||||
UserManager.getInstance().getUser(userId).addTournament(playerId, tournamentSession);
|
||||
TournamentPlayer player = tournament.getPlayer(playerId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue