[tor-commits] [tor/master] omit the first heartbeat message (resolves ticket 6758)

nickm at torproject.org nickm at torproject.org
Tue Sep 4 14:16:22 UTC 2012


commit e964f811437290ada91b62b44efb5caf7b491da4
Author: Roger Dingledine <arma at torproject.org>
Date:   Mon Sep 3 18:13:35 2012 -0400

    omit the first heartbeat message (resolves ticket 6758)
---
 changes/feature6758 |    5 +++++
 src/or/main.c       |    3 ++-
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/changes/feature6758 b/changes/feature6758
new file mode 100644
index 0000000..049f05e
--- /dev/null
+++ b/changes/feature6758
@@ -0,0 +1,5 @@
+  o Minor features:
+    - Omit the first heartbeat log message, because it never has anything
+      useful to say, and it clutters up the bootstrapping messages.
+      Resolves ticket 6758.
+
diff --git a/src/or/main.c b/src/or/main.c
index 20a1e08..da79cbd 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;
   }
 }





More information about the tor-commits mailing list