increate timeout and spam the log less

master
Michael Zanetti 2019-01-10 20:11:37 +01:00
parent bc47c9ccd4
commit cffaf3e507
2 changed files with 5 additions and 2 deletions

View File

@ -61,7 +61,7 @@ void DeviceMonitor::ping()
return;
}
m_pingProcess->start("arping", {"-I", targetInterface.name(), "-f", "-w", "90", m_host->address()});
m_pingProcess->start("arping", {"-I", targetInterface.name(), "-f", "-w", "180", m_host->address()});
}
void DeviceMonitor::arpLookupFinished(int exitCode)

View File

@ -163,5 +163,8 @@ void DevicePluginNetworkDetector::deviceSeen()
{
DeviceMonitor *monitor = static_cast<DeviceMonitor*>(sender());
Device *device = m_monitors.value(monitor);
device->setStateValue(networkDeviceLastSeenTimeStateTypeId, QDateTime::currentDateTime().toTime_t());
QDateTime oldLastSeen = QDateTime::fromTime_t(device->stateValue(networkDeviceLastSeenTimeStateTypeId).toInt());
if (oldLastSeen.addSecs(60) < QDateTime::currentDateTime()) {
device->setStateValue(networkDeviceLastSeenTimeStateTypeId, QDateTime::currentDateTime().toTime_t());
}
}