mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-05-23 18:37:19 +02:00
simplify code
This commit is contained in:
parent
f05548f3a3
commit
66f36195d8
@ -49,16 +49,16 @@ void McResolver::pingWithDomainA(QString domain, int port) {
|
||||
if (hostInfo.error() != QHostInfo::NoError) {
|
||||
emitFail("A record lookup failed");
|
||||
return;
|
||||
} else {
|
||||
auto records = hostInfo.addresses();
|
||||
if (records.isEmpty()) {
|
||||
emitFail("No A entries found for domain");
|
||||
return;
|
||||
}
|
||||
|
||||
const auto& firstRecord = records.at(0);
|
||||
emitSucceed(firstRecord.toString(), port);
|
||||
}
|
||||
|
||||
auto records = hostInfo.addresses();
|
||||
if (records.isEmpty()) {
|
||||
emitFail("No A entries found for domain");
|
||||
return;
|
||||
}
|
||||
|
||||
const auto& firstRecord = records.at(0);
|
||||
emitSucceed(firstRecord.toString(), port);
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user