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