Make sure NetworkDeviceMonitor on localhost are always reachable
This commit is contained in:
parent
5f4f2a9b78
commit
269efecb36
@ -703,6 +703,14 @@ void NetworkDeviceDiscoveryImpl::evaluateMonitor(NetworkDeviceMonitorImpl *monit
|
|||||||
|
|
||||||
bool requiresRefresh = false;
|
bool requiresRefresh = false;
|
||||||
|
|
||||||
|
if (monitor->networkDeviceInfo().address() == QHostAddress::LocalHost) {
|
||||||
|
// The localhost has to be always reachable
|
||||||
|
monitor->setLastConnectionAttempt(currentDateTime);
|
||||||
|
monitor->setLastSeen(currentDateTime);
|
||||||
|
monitor->setReachable(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!monitor->networkDeviceInfo().isValid()) {
|
if (!monitor->networkDeviceInfo().isValid()) {
|
||||||
qCDebug(dcNetworkDeviceDiscovery()) << "Network device info not valid for" << monitor;
|
qCDebug(dcNetworkDeviceDiscovery()) << "Network device info not valid for" << monitor;
|
||||||
requiresRefresh = true;
|
requiresRefresh = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user