mirror of
https://github.com/debauchee/barrier.git
synced 2026-07-17 11:31:35 +08:00
Cleared buffer on send instead of write #4721
This commit is contained in:
@@ -95,13 +95,6 @@ IpcLogOutputter::show(bool showIfEmpty)
|
||||
bool
|
||||
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).
|
||||
if (m_bufferThread != nullptr &&
|
||||
Thread::getCurrentThread().getID() == m_bufferThreadId) {
|
||||
@@ -192,6 +185,9 @@ void
|
||||
IpcLogOutputter::sendBuffer()
|
||||
{
|
||||
if (m_buffer.empty() || !m_ipcServer.hasClients(kIpcClientGui)) {
|
||||
if (!m_buffer.empty()) {
|
||||
m_buffer.clear();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user