Utils: portOpen: use ReadOnly

This commit is contained in:
tobtoht 2023-04-20 22:21:25 +02:00
parent fea15c2ff0
commit f27991b69c
No known key found for this signature in database
GPG key ID: E45B10DD027D2472

View file

@ -298,7 +298,7 @@ bool portOpen(const QString &hostname, quint16 port) { // TODO: this call should
qDebug() << QString("Checking for open port on: %1:%2").arg(hostname, QString::number(port));
QTcpSocket socket;
socket.connectToHost(hostname, port);
socket.connectToHost(hostname, port, QIODeviceBase::ReadOnly);
bool res = socket.waitForConnected(600);
qDebug() << QString("Port " + (res ? QString("Open") : QString("Closed")));
return res;