From 7e8931038651c0e31cfd00ff35bab217be051e31 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Thu, 20 Apr 2023 22:29:37 +0200 Subject: [PATCH] Utils: portOpen: additional error logging --- src/utils/Utils.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils/Utils.cpp b/src/utils/Utils.cpp index 092d367..f012c00 100644 --- a/src/utils/Utils.cpp +++ b/src/utils/Utils.cpp @@ -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; }