Make sure NetworkDeviceMonitor on localhost are always reachable

pull/703/head
Simon Stürz 2025-09-10 15:02:52 +02:00
parent 5f4f2a9b78
commit 269efecb36
1 changed files with 8 additions and 0 deletions

View File

@ -703,6 +703,14 @@ void NetworkDeviceDiscoveryImpl::evaluateMonitor(NetworkDeviceMonitorImpl *monit
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()) {
qCDebug(dcNetworkDeviceDiscovery()) << "Network device info not valid for" << monitor;
requiresRefresh = true;