summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/control
diff options
context:
space:
mode:
Diffstat (limited to 'src/jrummikub/control')
-rw-r--r--src/jrummikub/control/network/NetworkControl.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/jrummikub/control/network/NetworkControl.java b/src/jrummikub/control/network/NetworkControl.java
index 5e38d1e..85a0aff 100644
--- a/src/jrummikub/control/network/NetworkControl.java
+++ b/src/jrummikub/control/network/NetworkControl.java
@@ -240,6 +240,12 @@ public class NetworkControl {
view.showGameListPanel(false);
view.showConnectPanel(false);
+ abortControls();
+
+ connectionControl.disconnect();
+ }
+
+ private void abortControls() {
if (settingsControl != null) {
settingsControl.abort();
settingsControl = null;
@@ -256,8 +262,6 @@ public class NetworkControl {
gameControl.abortGame();
gameControl = null;
}
-
- connectionControl.disconnect();
}
/**
@@ -355,6 +359,7 @@ public class NetworkControl {
@Override
public void handle() {
view.setBottomPanel(BottomPanelType.START_GAME_PANEL);
+ abortControls();
view.showGameListPanel(true);
}
});
@@ -362,6 +367,7 @@ public class NetworkControl {
@Override
public void handle() {
view.setBottomPanel(BottomPanelType.START_GAME_PANEL);
+ abortControls();
view.showGameListPanel(true);
}
});