#3323: New perspectives, fixed deadlock freeze

This commit is contained in:
magenoxx 2017-05-13 18:57:33 +03:00
parent 53228d2389
commit 2a366c4022

View file

@ -961,7 +961,7 @@ public class GameController implements GameCallback {
}
}
private synchronized void setupTimeout(final UUID playerId) {
private void setupTimeout(final UUID playerId) {
if (!useTimeout) {
return;
}
@ -973,9 +973,12 @@ public class GameController implements GameCallback {
);
}
private synchronized void cancelTimeout() {
private void cancelTimeout() {
logger.debug("cancelTimeout");
if (futureTimeout != null) {
futureTimeout.cancel(false);
synchronized (futureTimeout) {
futureTimeout.cancel(false);
}
}
}