Kaydet (Commit) 30791330 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Do display the computer name in the dialog when connection failed

The latestInstance lifecycle and mName initialisation was borked.

Change-Id: If7ef8a15fdc297e0fe6e401399a3b94dcd8d08c5
üst 2244bb14
......@@ -47,6 +47,7 @@ public abstract class Client {
CommunicationService aCommunicationService,
Receiver aReceiver) {
mServer = aServer;
mName = aServer.getName();
mCommunicationService = aCommunicationService;
mReceiver = aReceiver;
latestInstance = this;
......@@ -92,7 +93,6 @@ public abstract class Client {
// TODO stream couldn't be opened.
e1.printStackTrace();
} finally {
latestInstance = null;
onDisconnect();
}
......
......@@ -37,7 +37,6 @@ public class NetworkClient extends Client {
Receiver aReceiver) throws UnknownHostException,
IOException {
super(aServer, aCommunicationService, aReceiver);
mName = aServer.getName();
mSocket = new Socket(aServer.getAddress(), PORT);
mInputStream = mSocket.getInputStream();
mReader = new BufferedReader(new InputStreamReader(mInputStream,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment