mirror of
https://github.com/itay-grudev/SingleApplication.git
synced 2025-01-15 08:52:08 +08:00
Merge pull request #143 from deepbluev7/fix-crash-on-ack
Fix crash when sending ack on removed connection
This commit is contained in:
commit
3d7c1ea7bb
@ -503,12 +503,14 @@ void SingleApplicationPrivate::slotDataAvailable( QLocalSocket *dataSocket, quin
|
|||||||
if ( !isFrameComplete( dataSocket ) )
|
if ( !isFrameComplete( dataSocket ) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Q_EMIT q->receivedMessage( instanceId, dataSocket->readAll() );
|
const QByteArray message = dataSocket->readAll();
|
||||||
|
|
||||||
writeAck( dataSocket );
|
writeAck( dataSocket );
|
||||||
|
|
||||||
ConnectionInfo &info = connectionMap[dataSocket];
|
ConnectionInfo &info = connectionMap[dataSocket];
|
||||||
info.stage = StageConnectedHeader;
|
info.stage = StageConnectedHeader;
|
||||||
|
|
||||||
|
Q_EMIT q->receivedMessage( instanceId, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SingleApplicationPrivate::slotClientConnectionClosed( QLocalSocket *closedSocket, quint32 instanceId )
|
void SingleApplicationPrivate::slotClientConnectionClosed( QLocalSocket *closedSocket, quint32 instanceId )
|
||||||
|
Loading…
Reference in New Issue
Block a user