summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/jrummikub/control/network/ConnectionControl.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/jrummikub/control/network/ConnectionControl.java b/src/jrummikub/control/network/ConnectionControl.java
index b5e3ac5..f4d5f64 100644
--- a/src/jrummikub/control/network/ConnectionControl.java
+++ b/src/jrummikub/control/network/ConnectionControl.java
@@ -646,6 +646,8 @@ public class ConnectionControl implements IConnectionControl {
}
if (error == null) {
+ connection.addConnectionListener(new DisconnectListener());
+
requestGames();
emitLater(connectedEvent);
} else {
@@ -659,7 +661,6 @@ public class ConnectionControl implements IConnectionControl {
private LoginError doConnect() {
try {
connection.connect();
- connection.addConnectionListener(new DisconnectListener());
return null;
} catch (XMPPException e) {
XMPPError xmppError = e.getXMPPError();
@@ -816,14 +817,14 @@ public class ConnectionControl implements IConnectionControl {
private abstract class SendRunner implements Runnable {
Message message;
-
+
public SendRunner() {
DefaultPacketExtension extension = createJRummikubExtension();
addData(extension);
message = createMessage(extension);
modifyMessage(message);
}
-
+
@Override
public void run() {
// For thread safety