| Index: webrtc/examples/androidapp/src/org/appspot/apprtc/DirectRTCClient.java
|
| diff --git a/webrtc/examples/androidapp/src/org/appspot/apprtc/DirectRTCClient.java b/webrtc/examples/androidapp/src/org/appspot/apprtc/DirectRTCClient.java
|
| index 8db38ae830ff61032f8b1ef619836931d6dc3b97..3de0dc03b399c9e62edf8bbf16515f3f07705aaa 100644
|
| --- a/webrtc/examples/androidapp/src/org/appspot/apprtc/DirectRTCClient.java
|
| +++ b/webrtc/examples/androidapp/src/org/appspot/apprtc/DirectRTCClient.java
|
| @@ -64,9 +64,9 @@ public class DirectRTCClient implements AppRTCClient, TCPChannelClient.TCPChanne
|
| // All alterations of the room state should be done from inside the looper thread.
|
| private ConnectionState roomState;
|
|
|
| - public DirectRTCClient(SignalingEvents events) {
|
| + public DirectRTCClient(SignalingEvents events, LooperExecutor looperExecutor) {
|
| this.events = events;
|
| - executor = new LooperExecutor();
|
| + executor = looperExecutor;
|
|
|
| executor.requestStart();
|
| roomState = ConnectionState.NEW;
|
| @@ -100,7 +100,6 @@ public class DirectRTCClient implements AppRTCClient, TCPChannelClient.TCPChanne
|
| disconnectFromRoomInternal();
|
| }
|
| });
|
| - executor.requestStop();
|
| }
|
|
|
| /**
|
| @@ -296,11 +295,13 @@ public class DirectRTCClient implements AppRTCClient, TCPChannelClient.TCPChanne
|
| @Override
|
| public void onTCPError(String description) {
|
| reportError("TCP connection error: " + description);
|
| + executor.requestStop();
|
| }
|
|
|
| @Override
|
| public void onTCPClose() {
|
| events.onChannelClose();
|
| + executor.requestStop();
|
| }
|
|
|
| // --------------------------------------------------------------------
|
|
|