From: tobtoht Date: Thu, 20 Apr 2023 20:29:37 +0000 (+0200) Subject: Utils: portOpen: additional error logging X-Git-Url: https://git.nutra.tk/v2?a=commitdiff_plain;h=7e8931038651c0e31cfd00ff35bab217be051e31;p=gamesguru%2Ffeather.git Utils: portOpen: additional error logging --- diff --git a/src/utils/Utils.cpp b/src/utils/Utils.cpp index 092d3675..f012c00c 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; }