aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2012-09-03 18:13:35 -0400
committerRoger Dingledine <arma@torproject.org>2012-09-03 18:13:35 -0400
commite964f811437290ada91b62b44efb5caf7b491da4 (patch)
treea46c484cc367ba80b1a58b090b3b7e87681f8b39 /src
parent3a0b8c85c4f8ea5ea2278917de6fcf1a201d1cbf (diff)
downloadtor-e964f811437290ada91b62b44efb5caf7b491da4.tar
tor-e964f811437290ada91b62b44efb5caf7b491da4.tar.gz
omit the first heartbeat message (resolves ticket 6758)
Diffstat (limited to 'src')
-rw-r--r--src/or/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/main.c b/src/or/main.c
index 20a1e086a..da79cbdfd 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -1561,7 +1561,8 @@ run_scheduled_events(time_t now)
/** 12. write the heartbeat message */
if (options->HeartbeatPeriod &&
time_to_next_heartbeat <= now) {
- log_heartbeat(now);
+ if (time_to_next_heartbeat) /* don't log the first heartbeat */
+ log_heartbeat(now);
time_to_next_heartbeat = now+options->HeartbeatPeriod;
}
}