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,
|
CommunicationService aCommunicationService,
|
||||||
Receiver aReceiver) {
|
Receiver aReceiver) {
|
||||||
mServer = aServer;
|
mServer = aServer;
|
||||||
|
mName = aServer.getName();
|
||||||
mCommunicationService = aCommunicationService;
|
mCommunicationService = aCommunicationService;
|
||||||
mReceiver = aReceiver;
|
mReceiver = aReceiver;
|
||||||
latestInstance = this;
|
latestInstance = this;
|
||||||
@ -92,7 +93,6 @@ public abstract class Client {
|
|||||||
// TODO stream couldn't be opened.
|
// TODO stream couldn't be opened.
|
||||||
e1.printStackTrace();
|
e1.printStackTrace();
|
||||||
} finally {
|
} finally {
|
||||||
latestInstance = null;
|
|
||||||
onDisconnect();
|
onDisconnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,7 +37,6 @@ public class NetworkClient extends Client {
|
|||||||
Receiver aReceiver) throws UnknownHostException,
|
Receiver aReceiver) throws UnknownHostException,
|
||||||
IOException {
|
IOException {
|
||||||
super(aServer, aCommunicationService, aReceiver);
|
super(aServer, aCommunicationService, aReceiver);
|
||||||
mName = aServer.getName();
|
|
||||||
mSocket = new Socket(aServer.getAddress(), PORT);
|
mSocket = new Socket(aServer.getAddress(), PORT);
|
||||||
mInputStream = mSocket.getInputStream();
|
mInputStream = mSocket.getInputStream();
|
||||||
mReader = new BufferedReader(new InputStreamReader(mInputStream,
|
mReader = new BufferedReader(new InputStreamReader(mInputStream,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user