close hibernate session when removing a game. shouldn't have to explicitly do it but why not

This commit is contained in:
Andy Janata 2012-11-09 23:12:21 -08:00
parent 972229aa17
commit 18e51e9d04
1 changed files with 1 additions and 0 deletions

View File

@ -274,6 +274,7 @@ public class Game {
}
// this seems terrible
if (players.size() == 0) {
hibernateSession.close();
gameManager.destroyGame(id);
}
if (players.size() < 3 && state != GameState.LOBBY) {