summaryrefslogtreecommitdiffstats
path: root/src/jrummikub
diff options
context:
space:
mode:
Diffstat (limited to 'src/jrummikub')
-rw-r--r--src/jrummikub/control/network/ConnectionControl.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/jrummikub/control/network/ConnectionControl.java b/src/jrummikub/control/network/ConnectionControl.java
index 0de8776..b5e3ac5 100644
--- a/src/jrummikub/control/network/ConnectionControl.java
+++ b/src/jrummikub/control/network/ConnectionControl.java
@@ -815,16 +815,21 @@ 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
Connection theConnection = connection;
if (theConnection != null) {
- DefaultPacketExtension extension = createJRummikubExtension();
- addData(extension);
- Message message = createMessage(extension);
- modifyMessage(message);
theConnection.sendPacket(message);
}
}