1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-03-26 13:22:31 -09:00

Merge pull request from spjspj/master

Scenario I was testing for this fix:
This commit is contained in:
spjspj 2018-02-03 18:45:52 +11:00 committed by GitHub
commit aebc16dc82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions
Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human
Mage/src/main/java/mage/game

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();
}