diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-07-12 16:38:01 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-07-12 16:38:01 +0200 |
commit | 10c1fb64c8ea025308e04b68021c34667ec99ed8 (patch) | |
tree | aaafd7d8a32ac5628c37d09f9efabac2a287ad9a /common/listener.cpp | |
parent | b948ffa771054e8a7780ccfc38de11762bcdfcd6 (diff) | |
download | sink-10c1fb64c8ea025308e04b68021c34667ec99ed8.tar.gz sink-10c1fb64c8ea025308e04b68021c34667ec99ed8.zip |
Ensure we send the response before closing the socket.
Diffstat (limited to 'common/listener.cpp')
-rw-r--r-- | common/listener.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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 | |||
397 | auto command = Sink::Commands::CreateCommandCompletion(m_fbb, messageId, success); | 397 | auto command = Sink::Commands::CreateCommandCompletion(m_fbb, messageId, success); |
398 | Sink::Commands::FinishCommandCompletionBuffer(m_fbb, command); | 398 | Sink::Commands::FinishCommandCompletionBuffer(m_fbb, command); |
399 | Sink::Commands::write(socket, ++m_messageId, Sink::Commands::CommandCompletionCommand, m_fbb); | 399 | Sink::Commands::write(socket, ++m_messageId, Sink::Commands::CommandCompletionCommand, m_fbb); |
400 | if (m_exiting) { | ||
401 | socket->waitForBytesWritten(); | ||
402 | } | ||
400 | m_fbb.Clear(); | 403 | m_fbb.Clear(); |
401 | } | 404 | } |
402 | 405 | ||