mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 11:32:00 -08:00
network: improved stability (random errors related to #11285 and ConcurrentModificationException);
This commit is contained in:
parent
6aaaa8cb46
commit
414699f7d4
1 changed files with 5 additions and 2 deletions
|
|
@ -97,8 +97,11 @@ public class GameSessionWatcher {
|
||||||
}
|
}
|
||||||
|
|
||||||
public GameView getGameView() {
|
public GameView getGameView() {
|
||||||
GameView gameView = new GameView(game.getState(), game, null, userId);
|
// game view calculation can take some time, so use copy for thread save (protection from ConcurrentModificationException)
|
||||||
processWatchedHands(game, userId, gameView);
|
Game sourceGame = game.copy();
|
||||||
|
|
||||||
|
GameView gameView = new GameView(sourceGame.getState(), sourceGame, null, userId);
|
||||||
|
processWatchedHands(sourceGame, userId, gameView);
|
||||||
return gameView;
|
return gameView;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue