Print socket error when connection fails

This commit is contained in:
Nicolas Fella 2019-05-26 20:36:35 +02:00
parent 8ea5a06470
commit e1827ae33c
2 changed files with 3 additions and 2 deletions

View file

@ -217,11 +217,12 @@ void LanLinkProvider::udpBroadcastReceived()
}
}
void LanLinkProvider::connectError()
void LanLinkProvider::connectError(QAbstractSocket::SocketError socketError)
{
QSslSocket* socket = qobject_cast<QSslSocket*>(sender());
if (!socket) return;
qCDebug(KDECONNECT_CORE) << "Socket error" << socketError;
qCDebug(KDECONNECT_CORE) << "Fallback (1), try reverse connection (send udp packet)" << socket->errorString();
NetworkPacket np(QLatin1String(""));
NetworkPacket::createIdentityPacket(&np);

View file

@ -63,7 +63,7 @@ public Q_SLOTS:
void onStop() override;
void tcpSocketConnected();
void encrypted();
void connectError();
void connectError(QAbstractSocket::SocketError socketError);
private Q_SLOTS:
void udpBroadcastReceived();