diff --git a/lldb/source/Core/Communication.cpp b/lldb/source/Core/Communication.cpp index d05eb3b1556f7ce595ebf961c21d191871551718..4ebced118a4e348e7619d6b35fde9ee1e9a92e1d 100644 --- a/lldb/source/Core/Communication.cpp +++ b/lldb/source/Core/Communication.cpp @@ -211,8 +211,10 @@ Communication::StartReadThread (Error *error_ptr) char thread_name[1024]; snprintf(thread_name, sizeof(thread_name), "", m_broadcaster_name.AsCString()); + m_read_thread_enabled = true; m_read_thread = Host::ThreadCreate (thread_name, Communication::ReadThread, this, error_ptr); - m_read_thread_enabled = m_read_thread != LLDB_INVALID_HOST_THREAD; + if (m_read_thread == LLDB_INVALID_HOST_THREAD) + m_read_thread_enabled = false; return m_read_thread_enabled; }