From 332e96d1098b00ab21e635a19e9b427d3c735e33 Mon Sep 17 00:00:00 2001 From: Sebastian Hahn Date: Sun, 22 Jan 2012 13:39:56 +0100 Subject: Fix fencepost error with HearbeatPeriod option We'd only log every HeartbeatPeriod + 1 seconds. Discovered by Scott Bennett, reported as bug 4942. --- src/or/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/or/main.c b/src/or/main.c index 7ef14aaa76..9022f2eb87 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -1533,7 +1533,7 @@ run_scheduled_events(time_t now) /** 12. write the heartbeat message */ if (options->HeartbeatPeriod && - time_to_next_heartbeat < now) { + time_to_next_heartbeat <= now) { log_heartbeat(now); time_to_next_heartbeat = now+options->HeartbeatPeriod; } -- cgit v1.2.3-54-g00ecf