mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
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:
parent
db0fc1b439
commit
b924f4bb6b
2 changed files with 7 additions and 2 deletions
|
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue