My ticket23573 branch has some draft code that implements this issue.
It also has the sleep(1); that mitigates #23570 (moved).
If we want to add these checks that our connection shutdown code works, I can revise it and write a changes file. It would be useful for chutney, which doesn't rotate connections in the short time it's running a network.
Or we can just let the OS do the connection cleanup for us.
Trac: Status: assigned to needs_review Keywords: N/Adeleted, chutney-wants, correctness added
I'd rather have a real fix for #23570 (moved) than the sleep() call here, if at all possible.
Maybe we should just fflush() everything?
I think that rather than having main.c call hibernate_go_dormant, we should extract the relevant part of hibernate_go_dormant into a new function, and have main.c call that.
Is the connection_mark_for_close() in hibernate_go_dormant enough here? It only marks the connections; it doesn't necessarily close them.
The commit message says Implements #435, but I don't think that's right?
I'd rather have a real fix for #23570 (moved) than the sleep() call here, if at all possible.
Maybe we should just fflush() everything?
The sleep() call isn't a great fix. I think fflush() would be a good idea: I'm not sure if it's enough.
I think that rather than having main.c call hibernate_go_dormant, we should extract the relevant part of hibernate_go_dormant into a new function, and have main.c call that.
Ack.
The commit message says Implements #435, but I don't think that's right?
It's right for experimental PrivCount :-)
I'll fix it now I know we want something like this upstreamed.
I'd rather have a real fix for #23570 (moved) than the sleep() call here, if at all possible.
Maybe we should just fflush() everything?
The sleep() call isn't a great fix. I think fflush() would be a good idea: I'm not sure if it's enough.
The correct call here is queued_events_flush_all(1).
The sleep(1) does nothing (or doesn't do much), because we've just shut down all our timers. Also, the sleep() call crashes tor, if the sandbox is enabled.
Marking a number of 0.3.5 tickets as possible, maybe even a good idea, for later. Possibly backportable, some of them. But not currently things to do as part of 0.3.5 stabilization.