Don't create tournament games, when server restarts.

This commit is contained in:
marcins78@gmail.com
2012-07-09 20:30:38 +00:00
parent 4ed7820cfd
commit 54a4926832

View File

@@ -522,18 +522,20 @@ public class HallServer extends AbstractServer {
private void createGameInternal(final LotroGameParticipant[] participants) {
_hallDataAccessLock.writeLock().lock();
try {
HallServer.this.createGame(String.valueOf(_nextTableId++), participants,
new GameResultListener() {
@Override
public void gameFinished(String winnerPlayerId, String winReason, Map<String, String> loserPlayerIdsWithReasons) {
_tournament.reportGameFinished(HallTournamentCallback.this, winnerPlayerId, loserPlayerIdsWithReasons.keySet().iterator().next());
}
if (!_shutdown) {
HallServer.this.createGame(String.valueOf(_nextTableId++), participants,
new GameResultListener() {
@Override
public void gameFinished(String winnerPlayerId, String winReason, Map<String, String> loserPlayerIdsWithReasons) {
_tournament.reportGameFinished(HallTournamentCallback.this, winnerPlayerId, loserPlayerIdsWithReasons.keySet().iterator().next());
}
@Override
public void gameCancelled() {
createGameInternal(participants);
}
}, _formatLibrary.getFormat(_tournament.getFormat()), _tournament.getTournamentName(), true, true);
@Override
public void gameCancelled() {
createGameInternal(participants);
}
}, _formatLibrary.getFormat(_tournament.getFormat()), _tournament.getTournamentName(), true, true);
}
} finally {
_hallDataAccessLock.writeLock().unlock();
}