• Roger Dingledine's avatar
    respect accountingmax during soft hibernation · a7ccd9a9
    Roger Dingledine authored
    Relays now respect their AccountingMax bandwidth again. When relays
    entered "soft" hibernation (which typically starts when we've hit
    90% of our AccountingMax), we had stopped checking whether we should
    enter hard hibernation. Soft hibernation refuses new connections and
    new circuits, but the existing circuits can continue, meaning that
    relays could have exceeded their configured AccountingMax.
    This commit rolls back some of the cpu-saving fixes, where we tried
    to avoid calling so many of our events while we're off the network.
    That's because PERIODIC_EVENT_FLAG_NEED_NET checks net_is_disabled(),
    which returns true even if we're only in soft hibernation.
    Fixes bug 32108; bugfix on