• Mike Perry's avatar
    Bug 28780: Make use of purpose to keep padding circuits open. · 66282547
    Mike Perry authored
    When a circuit is marked for close, check to see if any of our padding
    machines want to take ownership of it and continue padding until the machine
    hits the END state.
    
    For safety, we also ensure that machines that do not terminate are still
    closed as follows: Because padding machine timers are UINT32_MAX in size, if
    some sort of network event doesn't happen on a padding-only circuit within
    that time, we can conclude it is deadlocked and allow
    circuit_expire_old_circuits_clientside() to close it.
    
    If too much network activity happens, then per-machine padding limits can be
    used to cease padding, which will cause network cell events to cease, on the
    circuit, which will cause circpad to abandon the circuit as per the above time
    limit.
    66282547