mirror of
https://github.com/intel/llvm.git
synced 2026-01-22 23:49:22 +08:00
Fixed an issue where even if the communication object had Clear() called on
it, it could try and call through to an installed callback. llvm-svn: 138146
This commit is contained in:
@@ -64,6 +64,7 @@ Communication::~Communication()
|
||||
void
|
||||
Communication::Clear()
|
||||
{
|
||||
SetReadThreadBytesReceivedCallback (NULL, NULL);
|
||||
StopReadThread (NULL);
|
||||
Disconnect (NULL);
|
||||
}
|
||||
@@ -295,7 +296,7 @@ Communication::AppendBytesToCache (const uint8_t * bytes, size_t len, bool broad
|
||||
// If the user registered a callback, then call it and do not broadcast
|
||||
m_callback (m_callback_baton, bytes, len);
|
||||
}
|
||||
else
|
||||
else if (bytes != NULL && len > 0)
|
||||
{
|
||||
Mutex::Locker locker(m_bytes_mutex);
|
||||
m_bytes.append ((const char *)bytes, len);
|
||||
|
||||
Reference in New Issue
Block a user