Skip to content

Commit dfb1485

Browse files
committed
adjust node last seen logic a tiny bit
1 parent ed19943 commit dfb1485

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

matter_server/server/device_controller.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1187,9 +1187,11 @@ def _on_mdns_operational_node_state(
11871187
# mdns events for matter devices arrive in bursts of (duplicate) messages
11881188
# so we debounce this as we only use the mdns messages for operational node discovery
11891189
# and we have other logic in place to determine node aliveness
1190+
now = time.time()
11901191
last_seen = self._node_last_seen.get(node_id, 0)
1191-
if node.available and time.time() - last_seen < MAX_NODE_SUBSCRIPTION_CEILING:
1192+
if node.available and now - last_seen < 60:
11921193
return
1194+
self._node_last_seen[node_id] = now
11931195

11941196
# we treat UPDATE state changes as ADD if the node is marked as
11951197
# unavailable to ensure we catch a node being operational

0 commit comments

Comments
 (0)