mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -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() {
|
||||
GameView gameView = new GameView(game.getState(), game, null, userId);
|
||||
processWatchedHands(game, userId, gameView);
|
||||
// game view calculation can take some time, so use copy for thread save (protection from ConcurrentModificationException)
|
||||
Game sourceGame = game.copy();
|
||||
|
||||
GameView gameView = new GameView(sourceGame.getState(), sourceGame, null, userId);
|
||||
processWatchedHands(sourceGame, userId, gameView);
|
||||
return gameView;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue