mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 04:13:28 +01:00
Fix fencepost error with HearbeatPeriod option
We'd only log every HeartbeatPeriod + 1 seconds. Discovered by Scott Bennett, reported as bug 4942.
This commit is contained in:
parent
9bcf315e9b
commit
332e96d109
5
changes/bug4942
Normal file
5
changes/bug4942
Normal file
@ -0,0 +1,5 @@
|
||||
o Minor bugfixes:
|
||||
- Actually log the heartbeat message every HeartbeatPeriod seconds, not
|
||||
every HeartbeatPeriod + 1 seconds. Fixes bug 4942; bugfix on
|
||||
0.2.3.1-alpha.. Bug reported by Scott Bennett.
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user