diff options
author | Jannis Harder <harder@informatik.uni-luebeck.de> | 2011-06-22 07:45:21 +0200 |
---|---|---|
committer | Jannis Harder <harder@informatik.uni-luebeck.de> | 2011-06-22 07:45:21 +0200 |
commit | 21f144f963ac69a881efcf5d68e4648f22527c0f (patch) | |
tree | 5e9c817963c35ca2bd2cf9a39d8dfa51b48647e4 /src | |
parent | 936a22ff772b0b1561ad0611c8a7ff3566e01dca (diff) | |
download | JRummikub-21f144f963ac69a881efcf5d68e4648f22527c0f.tar JRummikub-21f144f963ac69a881efcf5d68e4648f22527c0f.zip |
Fixed threading issue
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@583 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src')
-rw-r--r-- | src/jrummikub/control/network/ConnectionControl.java | 13 |
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); } } |