mirror of
https://github.com/correl/mage.git
synced 2024-12-01 03:00:09 +00:00
Added error logs for freezes ignoring timer (see #4476)
This commit is contained in:
parent
ac81c5bbd4
commit
8596a92ed8
1 changed files with 9 additions and 1 deletions
|
@ -152,8 +152,16 @@ public class HumanPlayer extends PlayerImpl {
|
|||
protected void waitResponseOpen() {
|
||||
// wait response open for answer process
|
||||
int numTimesWaiting = 0;
|
||||
while (!responseOpenedForAnswer && canRespond() && numTimesWaiting < 300) {
|
||||
while (!responseOpenedForAnswer && canRespond()) {
|
||||
numTimesWaiting ++;
|
||||
if (numTimesWaiting >= 300) {
|
||||
// game freezed -- need to report about error and continue to execute
|
||||
String s = "Game freezed in waitResponseOpen for user " + getName();
|
||||
Throwable th = new IllegalStateException(s);
|
||||
logger.error(s, th);
|
||||
break;
|
||||
}
|
||||
|
||||
try {
|
||||
Thread.sleep(100);
|
||||
} catch (InterruptedException e) {
|
||||
|
|
Loading…
Reference in a new issue