Fix sleepy device being marked as reachable after a long time of being unreachable
Integer overflowfix-sleepy-device-reachable-hack
parent
a0d124695c
commit
443415e73a
|
|
@ -978,7 +978,7 @@ void ZigbeeNetwork::evaluateNodeReachableStates()
|
||||||
} else {
|
} else {
|
||||||
// Note: sleeping devices should send some message within 6 hours,
|
// Note: sleeping devices should send some message within 6 hours,
|
||||||
// otherwise the device might not be reachable any more
|
// otherwise the device might not be reachable any more
|
||||||
int msSinceLastSeen = node->lastSeen().msecsTo(QDateTime::currentDateTimeUtc());
|
qint64 msSinceLastSeen = node->lastSeen().msecsTo(QDateTime::currentDateTimeUtc());
|
||||||
qCDebug(dcZigbeeNetwork()) << node << "has been seen the last time" << QTime::fromMSecsSinceStartOfDay(msSinceLastSeen).toString() << "ago.";
|
qCDebug(dcZigbeeNetwork()) << node << "has been seen the last time" << QTime::fromMSecsSinceStartOfDay(msSinceLastSeen).toString() << "ago.";
|
||||||
// 6 Hours = 6 * 60 * 60 * 1000 = 21600000 ms
|
// 6 Hours = 6 * 60 * 60 * 1000 = 21600000 ms
|
||||||
if (msSinceLastSeen < 21600000) {
|
if (msSinceLastSeen < 21600000) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue