Merge pull request #125 from dail8859/fix-123

Remove ConnectionInfo after socket is destroyed
This commit is contained in:
Itay Grudev 2020-12-25 08:56:18 +00:00 committed by GitHub
commit e99b8df38f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -328,10 +328,11 @@ void SingleApplicationPrivate::slotConnectionEstablished()
}
);
QObject::connect(nextConnSocket, &QLocalSocket::disconnected,
QObject::connect(nextConnSocket, &QLocalSocket::disconnected, nextConnSocket, &QLocalSocket::deleteLater);
QObject::connect(nextConnSocket, &QLocalSocket::destroyed,
[nextConnSocket, this](){
connectionMap.remove(nextConnSocket);
nextConnSocket->deleteLater();
}
);