Scenario I was testing for this fix.

Local Server, EDH game with Player1, Player2, Player3.
Player1 has 2 mana reflections out, cast Torment of Hailfire for 15 and is tapping mana for it.
The 'choose replacement effect' popup comes up.
Whilst this is happening, Player2 concedes.
This will currently lock up the game and sits forever in waitResponseOpen.
 (With the time out now there, it will time out after 30 seconds or so.
This commit is contained in:
spjspj 2018-02-03 13:21:47 +11:00
parent db0fc1b439
commit b924f4bb6b
2 changed files with 7 additions and 2 deletions

View file

@ -151,11 +151,13 @@ public class HumanPlayer extends PlayerImpl {
protected void waitResponseOpen() {
// wait response open for answer process
while (!responseOpenedForAnswer && canRespond()) {
int numTimesWaiting = 0;
while (!responseOpenedForAnswer && canRespond() && numTimesWaiting < 300) {
numTimesWaiting ++;
try {
Thread.sleep(100);
} catch (InterruptedException e) {
logger.warn("Response waiting interrapted for " + getId());
logger.warn("Response waiting interrupted for " + getId());
}
}
}

View file

@ -2452,6 +2452,9 @@ public abstract class GameImpl implements Game, Serializable {
@Override
public UUID getPriorityPlayerId() {
if (state.getPriorityPlayerId() == null) {
return state.getActivePlayerId();
}
return state.getPriorityPlayerId();
}