Skip to content

Commit 8c3c67c

Browse files
nkljajicrzr
authored andcommitted
GH-40: MAX_PING_TIME_INTERVAL should be 24 hours, 24 not minutes
In ver_1.0.0 intended value was supposed to be 24 hours, as indicated by its comment. During refactoring this comment was lost, so value incorrectly remained 24 minutes. Interval of 24 minutes to ping failing device seems arbitrary and too short. Signed-off-by: Nenad Kljajic <nkljajic@control4.com>
1 parent c5cf19c commit 8c3c67c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

applications/zpc/components/network_monitor/src/failing_node_monitor.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ static void
136136
ping_interval = MAX_PING_TIME_INTERVAL;
137137
}
138138

139+
sl_log_debug(LOG_TAG,
140+
"Scheduling NOP command in %lu ms for NodeID: %d.",
141+
ping_interval,
142+
node_id);
139143
attribute_store_set_reported(ping_interval_node,
140144
&ping_interval,
141145
sizeof(ping_interval));

applications/zpc/components/network_monitor/src/failing_node_monitor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
#define FL_NODE_PING_TIME_FACTOR 4
5151

5252
// Maximum time we settle on between ping intervals:
53-
#define MAX_PING_TIME_INTERVAL (24 * 60 * CLOCK_SECOND)
53+
#define MAX_PING_TIME_INTERVAL (24 * 60 * 60 * CLOCK_SECOND) // 24 hours
5454

5555
#ifdef __cplusplus
5656
extern "C" {

0 commit comments

Comments
 (0)