Do not timeout after just 3000ms

Keep the network default timeout
This commit is contained in:
iTrooz
2024-11-26 18:24:46 +01:00
parent fef8ee2d1b
commit 3a9c030982

View File

@ -16,13 +16,13 @@ QJsonObject McClient::getStatusDataBlocking() {
qDebug() << "Connecting to socket.."; qDebug() << "Connecting to socket..";
socket.connectToHost(ip, port); socket.connectToHost(ip, port);
if (!socket.waitForConnected(3000)) { if (!socket.waitForConnected()) {
throw Exception("Failed to connect to socket"); throw Exception("Failed to connect to socket");
} }
qDebug() << "Connected to socket successfully"; qDebug() << "Connected to socket successfully";
sendRequest(); sendRequest();
if (!socket.waitForReadyRead(3000)) { if (!socket.waitForReadyRead()) {
throw Exception("Socket didn't send anything to read"); throw Exception("Socket didn't send anything to read");
} }
return readResponse(); return readResponse();