Skip to content
Snippets Groups Projects
Verified Commit 07e187d4 authored by Nicolas Werner's avatar Nicolas Werner
Browse files

Fix crash in SingleApplication when other end exits immediately

In those cases the emit might cause the server to remove the connection
and we are working with a dangling pointer. We can't call putChar on
that, so acknowledge the message immediately and then emit the message.
parent ff502f30
No related branches found
No related tags found
No related merge requests found
Pipeline #2165 failed
......@@ -494,12 +494,12 @@ void SingleApplicationPrivate::slotDataAvailable( QLocalSocket *dataSocket, quin
if ( !isFrameComplete( dataSocket ) )
return;
Q_EMIT q->receivedMessage( instanceId, dataSocket->readAll() );
writeAck( dataSocket );
ConnectionInfo &info = connectionMap[dataSocket];
info.stage = StageConnectedHeader;
Q_EMIT q->receivedMessage(instanceId, dataSocket->readAll());
}
void SingleApplicationPrivate::slotClientConnectionClosed( QLocalSocket *closedSocket, quint32 instanceId )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment