Print socket error when connection fails
This commit is contained in:
parent
8ea5a06470
commit
e1827ae33c
2 changed files with 3 additions and 2 deletions
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue