Broken condition in check_expired_networkstatus_callback()
Turns out that this condition in check_expired_networkstatus_callback()
:
if (ns && ns->valid_until < now+NS_EXPIRY_SLOP &&
router_have_minimum_dir_info()) {
router_dir_info_changed();
}
... is always true if we have all our needed directory info which means that router_dir_info_changed()
is called every 2 minutes (the callback interval).
Nick suggested that it should be now - NS_EXPIRY_SLOP
which goes like this:
If valid_until
is 6am today, then now - 24h
== 1pm yesterday, and valid_until < (now - 24h)
is false. But at 6:01am tomorrow, valid_until < now - 24h
becomes true.