mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-13 05:37:42 +02:00
Do not timeout after just 3000ms
Keep the network default timeout
This commit is contained in:
@ -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();
|
||||||
|
Reference in New Issue
Block a user