New perspectives, fixed deadlock freeze
@@ -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,11 +973,14 @@ public class GameController implements GameCallback {
);
}
- private synchronized void cancelTimeout() {
+ private void cancelTimeout() {
+ logger.debug("cancelTimeout");
if (futureTimeout != null) {
+ synchronized (futureTimeout) {
futureTimeout.cancel(false);
}
}
+ }
@FunctionalInterface
interface Command {
