Wake host on a separate worker thread to avoid hanging the UI for DNS resolution
This commit is contained in:
parent
8a2491d955
commit
78730f7235
3 changed files with 26 additions and 3 deletions
|
|
@ -177,6 +177,11 @@ bool NvComputer::wake()
|
|||
for (QString& addressString : addressList) {
|
||||
QHostInfo hostInfo = QHostInfo::fromName(addressString);
|
||||
|
||||
if (hostInfo.error() != QHostInfo::NoError) {
|
||||
qWarning() << "Error resolving" << addressString << ":" << hostInfo.errorString();
|
||||
continue;
|
||||
}
|
||||
|
||||
// Try all IP addresses that this string resolves to
|
||||
for (QHostAddress& address : hostInfo.addresses()) {
|
||||
QUdpSocket sock;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue