|
@@ -2004,18 +2004,24 @@ check_fw_helper_app_callback(time_t now, const or_options_t *options)
|
|
|
return PORT_FORWARDING_CHECK_INTERVAL;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
static int
|
|
|
heartbeat_callback(time_t now, const or_options_t *options)
|
|
|
{
|
|
|
static int first = 1;
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+ if (!options->HeartbeatPeriod) {
|
|
|
+ return PERIODIC_EVENT_NO_UPDATE;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
if (first) {
|
|
|
first = 0;
|
|
|
} else {
|
|
|
log_heartbeat(now);
|
|
|
}
|
|
|
-
|
|
|
- * callback event */
|
|
|
+
|
|
|
return options->HeartbeatPeriod;
|
|
|
}
|
|
|
|