Use the actual connection origin, so we don't keep all connections open.
This commit is contained in:
parent
8c07d88c17
commit
9c736583e2
1 changed files with 4 additions and 2 deletions
|
@ -269,14 +269,16 @@ void LanLinkProvider::encrypted()
|
|||
disconnect(socket, SIGNAL(encrypted()), this, SLOT(encrypted()));
|
||||
disconnect(socket, SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(sslErrors(QList<QSslError>)));
|
||||
|
||||
Q_ASSERT(socket->mode() != QSslSocket::UnencryptedMode);
|
||||
LanDeviceLink::ConnectionStarted connectionOrigin = (socket->mode() == QSslSocket::SslClientMode)? LanDeviceLink::Locally : LanDeviceLink::Remotely;
|
||||
|
||||
NetworkPackage* receivedPackage = receivedIdentityPackages[socket].np;
|
||||
const QString& deviceId = receivedPackage->get<QString>("deviceId");
|
||||
|
||||
addLink(deviceId, socket, receivedPackage, LanDeviceLink::Remotely);
|
||||
addLink(deviceId, socket, receivedPackage, connectionOrigin);
|
||||
|
||||
// Copied from connected slot, now delete received package
|
||||
delete receivedIdentityPackages.take(socket).np;
|
||||
|
||||
}
|
||||
|
||||
void LanLinkProvider::sslErrors(const QList<QSslError>& errors)
|
||||
|
|
Loading…
Reference in a new issue