Procházet zdrojové kódy

omit the first heartbeat message (resolves ticket 6758)

Roger Dingledine před 11 roky
rodič
revize
e964f81143
2 změnil soubory, kde provedl 7 přidání a 1 odebrání
  1. 5 0
      changes/feature6758
  2. 2 1
      src/or/main.c

+ 5 - 0
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.
+

+ 2 - 1
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;
   }
 }