| Index: remoting/client/client_context.cc
|
| diff --git a/remoting/client/client_context.cc b/remoting/client/client_context.cc
|
| index 5f6d1399ae755264331167542b55c85108dda31b..f77bed3c16f64e02e83b1993d48c6207bbb2000b 100644
|
| --- a/remoting/client/client_context.cc
|
| +++ b/remoting/client/client_context.cc
|
| @@ -13,7 +13,8 @@ namespace remoting {
|
|
|
| ClientContext::ClientContext()
|
| : main_thread_("ChromotingClientMainThread"),
|
| - decode_thread_("ChromotingClientDecodeThread") {
|
| + decode_thread_("ChromotingClientDecodeThread"),
|
| + started_(false) {
|
| }
|
|
|
| ClientContext::~ClientContext() {
|
| @@ -24,13 +25,17 @@ void ClientContext::Start() {
|
| main_thread_.Start();
|
| decode_thread_.Start();
|
| jingle_thread_.Start();
|
| + started_ = true;
|
| }
|
|
|
| void ClientContext::Stop() {
|
| - // Stop all the threads.
|
| - jingle_thread_.Stop();
|
| - decode_thread_.Stop();
|
| - main_thread_.Stop();
|
| + if (started_) {
|
| + // Stop all the threads.
|
| + jingle_thread_.Stop();
|
| + decode_thread_.Stop();
|
| + main_thread_.Stop();
|
| + started_ = false;
|
| + }
|
| }
|
|
|
| JingleThread* ClientContext::jingle_thread() {
|
|
|