Opened 8 years ago

Closed 8 years ago

#468 closed defect (fixed)

Handling resume and large clock shifts

Reported by: zzz Owned by: zzz
Priority: major Milestone: 0.8.8
Component: router/transport Version: 0.8.6
Keywords: Cc:
Parent Tickets: Sensitive: no

Description

The RouterClock? class should detect large clock shifts forward or backward. Forward probably indictates a formerly sleeping PC that has resumed.

RouterClock? should call a registered callback. This is not the same as the ClockUpdateListener?.

In the callback, the router should, if the shift is big enough:

  • Interrupt NTPClient to force an immediate update
  • Step-adjust rather than slew the offset retrieved from NTP
  • Flush all output queues in the transports
  • Flush all output queues in I2CP
  • Drop all NTCP and UDP connections
  • Check for a new IP (UPnP etc)
  • Kill all tunnels
  • Kill all pending tunnel builds
  • Force a profile reorganize
  • If it's big enough a shift (hours or days), "soft" restart the router (but not all the way to the wrapper). After 3 days most of the routerinfos will be killed unless we restart. But soft restart isn't well-used or well-tested now (only called on /config.jsp big changes), it probably needs work.

Or maybe anything over a couple minutes requies a soft restart.

to be researched.

Subtickets

Change History (2)

comment:1 Changed 8 years ago by zzz

Milestone: 0.8.100.8.8
Status: newassigned

Initial support in 0.8.7-9. Not done yet. Performs soft restart for shifts over ± 75 seconds.

comment:2 Changed 8 years ago by zzz

Resolution: fixed
Status: assignedclosed

Hopefully fixed in 0.8.8.

Note: See TracTickets for help on using tickets.