diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-11-24 05:42:31 +0100 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-11-24 05:42:31 +0100 |
commit | 0620632d6aa09105554105ffdf9dc132d3dfd34f (patch) | |
tree | ee6b56322b1526ec6defb312d328dc198689d429 /third_party | |
parent | fix lint (diff) | |
download | nheko-0620632d6aa09105554105ffdf9dc132d3dfd34f.tar.xz |
Properly fix #825
We should read the message before sending the ack!
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/SingleApplication-3.3.0/singleapplication_p.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/third_party/SingleApplication-3.3.0/singleapplication_p.cpp b/third_party/SingleApplication-3.3.0/singleapplication_p.cpp index 3b6f96fe..4069ef78 100644 --- a/third_party/SingleApplication-3.3.0/singleapplication_p.cpp +++ b/third_party/SingleApplication-3.3.0/singleapplication_p.cpp @@ -494,12 +494,14 @@ void SingleApplicationPrivate::slotDataAvailable( QLocalSocket *dataSocket, quin if ( !isFrameComplete( dataSocket ) ) return; + auto message = dataSocket->readAll(); + writeAck( dataSocket ); ConnectionInfo &info = connectionMap[dataSocket]; info.stage = StageConnectedHeader; - Q_EMIT q->receivedMessage(instanceId, dataSocket->readAll()); + Q_EMIT q->receivedMessage(instanceId, message); } void SingleApplicationPrivate::slotClientConnectionClosed( QLocalSocket *closedSocket, quint32 instanceId ) |