Merge pull request #143 from deepbluev7/fix-crash-on-ack

Fix crash when sending ack on removed connection
This commit is contained in:
Itay Grudev 2021-11-24 11:18:53 +02:00 committed by GitHub
commit 3d7c1ea7bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -503,12 +503,14 @@ void SingleApplicationPrivate::slotDataAvailable( QLocalSocket *dataSocket, quin
if ( !isFrameComplete( dataSocket ) )
return;
Q_EMIT q->receivedMessage( instanceId, dataSocket->readAll() );
const QByteArray message = dataSocket->readAll();
writeAck( dataSocket );
ConnectionInfo &info = connectionMap[dataSocket];
info.stage = StageConnectedHeader;
Q_EMIT q->receivedMessage( instanceId, message);
}
void SingleApplicationPrivate::slotClientConnectionClosed( QLocalSocket *closedSocket, quint32 instanceId )