Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#4942 closed defect (fixed)

HeartbeatPeriod has a fencepost error

Reported by: arma Owned by:
Priority: Medium Milestone: Tor: 0.2.3.x-final
Component: Core Tor/Tor Version:
Severity: Keywords: tor-relay
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Scott Bennett points out on tor-relays that the heartbeat messages are a second later than expected each time.

Sebastian confirms:

Jan 22 00:30:50.000 [notice] Heartbeat: Tor's uptime is 11 days 6:00 hours, with 384 circuits open. I've sent 183.45 GB and received 26.61 GB.
Jan 22 06:30:51.000 [notice] Heartbeat: Tor's uptime is 11 days 12:00 hours, with 358 circuits open. I've sent 185.58 GB and received 27.16 GB.
Jan 22 12:30:52.000 [notice] Heartbeat: Tor's uptime is 11 days 18:00 hours, with 1124 circuits open. I've sent 188.79 GB and received 27.77 GB.

Sebastian suggests

-      time_to_next_heartbeat < now) {
+      time_to_next_heartbeat <= now) {

Child Tickets

Change History (4)

comment:1 Changed 8 years ago by Sebastian

Status: newneeds_review

bug4942 in my repo

comment:2 Changed 8 years ago by arma

Resolution: fixed
Status: needs_reviewclosed

Merged. Thanks!

comment:3 Changed 7 years ago by nickm

Keywords: tor-relay added

comment:4 Changed 7 years ago by nickm

Component: Tor RelayTor
Note: See TracTickets for help on using tickets.