Do display the computer name in the dialog when connection failed

The latestInstance lifecycle and mName initialisation was borked.

Change-Id: If7ef8a15fdc297e0fe6e401399a3b94dcd8d08c5
This commit is contained in:
Tor Lillqvist 2013-02-13 02:10:34 +02:00
parent 2244bb1467
commit 307913304a
2 changed files with 1 additions and 2 deletions

View File

@ -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();
}

View File

@ -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,