]> Nutra Git (v2) - gamesguru/feather.git/commitdiff
Utils: portOpen: additional error logging
authortobtoht <tob@featherwallet.org>
Thu, 20 Apr 2023 20:29:37 +0000 (22:29 +0200)
committertobtoht <tob@featherwallet.org>
Thu, 20 Apr 2023 20:29:37 +0000 (22:29 +0200)
src/utils/Utils.cpp

index 092d367572631094e6f8fde9453d25925e3a4175..f012c00c2d4e9ede38f69f80b6b28595079513f8 100644 (file)
@@ -299,8 +299,11 @@ bool portOpen(const QString &hostname, quint16 port) { // TODO: this call should
 
     QTcpSocket socket;
     socket.connectToHost(hostname, port, QIODeviceBase::ReadOnly);
-    bool res = socket.waitForConnected(600);
+    bool res = socket.waitForConnected(1000);
     qDebug() << QString("Port " + (res ? QString("Open") : QString("Closed")));
+    if (!res) {
+        qDebug() << "Error: " << socket.error() << " - " << socket.errorString();
+    }
     return res;
 }