Remove unneeded disconnects
This commit is contained in:
parent
d3b6d1717d
commit
ecacb0eb80
1 changed files with 2 additions and 8 deletions
|
@ -214,8 +214,6 @@ void LanLinkProvider::connectError()
|
||||||
{
|
{
|
||||||
QSslSocket* socket = qobject_cast<QSslSocket*>(sender());
|
QSslSocket* socket = qobject_cast<QSslSocket*>(sender());
|
||||||
if (!socket) return;
|
if (!socket) return;
|
||||||
disconnect(socket, &QAbstractSocket::connected, this, &LanLinkProvider::connected);
|
|
||||||
disconnect(socket, QOverload<QAbstractSocket::SocketError>::of(&QAbstractSocket::error), this, &LanLinkProvider::connectError);
|
|
||||||
|
|
||||||
qCDebug(KDECONNECT_CORE) << "Fallback (1), try reverse connection (send udp packet)" << socket->errorString();
|
qCDebug(KDECONNECT_CORE) << "Fallback (1), try reverse connection (send udp packet)" << socket->errorString();
|
||||||
NetworkPacket np(QLatin1String(""));
|
NetworkPacket np(QLatin1String(""));
|
||||||
|
@ -235,10 +233,9 @@ void LanLinkProvider::connected()
|
||||||
QSslSocket* socket = qobject_cast<QSslSocket*>(sender());
|
QSslSocket* socket = qobject_cast<QSslSocket*>(sender());
|
||||||
|
|
||||||
if (!socket) return;
|
if (!socket) return;
|
||||||
disconnect(socket, &QAbstractSocket::connected, this, &LanLinkProvider::connected);
|
// TODO Delete me?
|
||||||
disconnect(socket, QOverload<QAbstractSocket::SocketError>::of(&QAbstractSocket::error), this, &LanLinkProvider::connectError);
|
disconnect(socket, QOverload<QAbstractSocket::SocketError>::of(&QAbstractSocket::error), this, &LanLinkProvider::connectError);
|
||||||
|
|
||||||
|
|
||||||
configureSocket(socket);
|
configureSocket(socket);
|
||||||
|
|
||||||
// If socket disconnects due to any reason after connection, link on ssl failure
|
// If socket disconnects due to any reason after connection, link on ssl failure
|
||||||
|
@ -297,7 +294,7 @@ void LanLinkProvider::encrypted()
|
||||||
|
|
||||||
QSslSocket* socket = qobject_cast<QSslSocket*>(sender());
|
QSslSocket* socket = qobject_cast<QSslSocket*>(sender());
|
||||||
if (!socket) return;
|
if (!socket) return;
|
||||||
disconnect(socket, &QSslSocket::encrypted, this, &LanLinkProvider::encrypted);
|
// TODO delete me?
|
||||||
disconnect(socket, QOverload<const QList<QSslError> &>::of(&QSslSocket::sslErrors), this, &LanLinkProvider::sslErrors);
|
disconnect(socket, QOverload<const QList<QSslError> &>::of(&QSslSocket::sslErrors), this, &LanLinkProvider::sslErrors);
|
||||||
|
|
||||||
Q_ASSERT(socket->mode() != QSslSocket::UnencryptedMode);
|
Q_ASSERT(socket->mode() != QSslSocket::UnencryptedMode);
|
||||||
|
@ -317,9 +314,6 @@ void LanLinkProvider::sslErrors(const QList<QSslError>& errors)
|
||||||
QSslSocket* socket = qobject_cast<QSslSocket*>(sender());
|
QSslSocket* socket = qobject_cast<QSslSocket*>(sender());
|
||||||
if (!socket) return;
|
if (!socket) return;
|
||||||
|
|
||||||
disconnect(socket, &QSslSocket::encrypted, this, &LanLinkProvider::encrypted);
|
|
||||||
disconnect(socket, QOverload<const QList<QSslError> &>::of(&QSslSocket::sslErrors), this, &LanLinkProvider::sslErrors);
|
|
||||||
|
|
||||||
qCDebug(KDECONNECT_CORE) << "Failing due to " << errors;
|
qCDebug(KDECONNECT_CORE) << "Failing due to " << errors;
|
||||||
Device* device = Daemon::instance()->getDevice(socket->peerVerifyName());
|
Device* device = Daemon::instance()->getDevice(socket->peerVerifyName());
|
||||||
if (device) {
|
if (device) {
|
||||||
|
|
Loading…
Reference in a new issue