From 10c1fb64c8ea025308e04b68021c34667ec99ed8 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 12 Jul 2016 16:38:01 +0200 Subject: Ensure we send the response before closing the socket. --- common/listener.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'common') diff --git a/common/listener.cpp b/common/listener.cpp index 6f86ee5..8f7518f 100644 --- a/common/listener.cpp +++ b/common/listener.cpp @@ -397,6 +397,9 @@ void Listener::sendCommandCompleted(QLocalSocket *socket, uint messageId, bool s auto command = Sink::Commands::CreateCommandCompletion(m_fbb, messageId, success); Sink::Commands::FinishCommandCompletionBuffer(m_fbb, command); Sink::Commands::write(socket, ++m_messageId, Sink::Commands::CommandCompletionCommand, m_fbb); + if (m_exiting) { + socket->waitForBytesWritten(); + } m_fbb.Clear(); } -- cgit v1.2.3