Merge PR #86: Fix sleepy device being marked as reachable after a long time of being unreachable
This commit is contained in:
commit
508ff2d191
@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user