Cleared buffer on send instead of write #4721
This commit is contained in:
parent
c4e8dc7198
commit
7614a21aac
|
@ -95,13 +95,6 @@ IpcLogOutputter::show(bool showIfEmpty)
|
||||||
bool
|
bool
|
||||||
IpcLogOutputter::write(ELevel, const char* text)
|
IpcLogOutputter::write(ELevel, const char* text)
|
||||||
{
|
{
|
||||||
if (!m_ipcServer.hasClients(kIpcClientGui)) {
|
|
||||||
if (!m_buffer.empty()) {
|
|
||||||
m_buffer.clear();
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ignore events from the buffer thread (would cause recursion).
|
// ignore events from the buffer thread (would cause recursion).
|
||||||
if (m_bufferThread != nullptr &&
|
if (m_bufferThread != nullptr &&
|
||||||
Thread::getCurrentThread().getID() == m_bufferThreadId) {
|
Thread::getCurrentThread().getID() == m_bufferThreadId) {
|
||||||
|
@ -192,6 +185,9 @@ void
|
||||||
IpcLogOutputter::sendBuffer()
|
IpcLogOutputter::sendBuffer()
|
||||||
{
|
{
|
||||||
if (m_buffer.empty() || !m_ipcServer.hasClients(kIpcClientGui)) {
|
if (m_buffer.empty() || !m_ipcServer.hasClients(kIpcClientGui)) {
|
||||||
|
if (!m_buffer.empty()) {
|
||||||
|
m_buffer.clear();
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue