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:
parent
2244bb1467
commit
307913304a
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user