mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-13 06:33:44 +01:00
Detach circuits from circuitmux early when freeing channel so they can find the channel by ID
This commit is contained in:
parent
3d092ffbdd
commit
c097fb33fc
@ -2766,6 +2766,10 @@ channel_free_list(smartlist_t *channels, int mark_for_close)
|
|||||||
"in state %s (%d)",
|
"in state %s (%d)",
|
||||||
curr, U64_PRINTF_ARG(curr->global_identifier),
|
curr, U64_PRINTF_ARG(curr->global_identifier),
|
||||||
channel_state_to_string(curr->state), curr->state);
|
channel_state_to_string(curr->state), curr->state);
|
||||||
|
/* Detach circuits early so they can find the channel */
|
||||||
|
if (curr->cmux) {
|
||||||
|
circuitmux_detach_all_circuits(curr->cmux);
|
||||||
|
}
|
||||||
channel_unregister(curr);
|
channel_unregister(curr);
|
||||||
if (mark_for_close) {
|
if (mark_for_close) {
|
||||||
if (!(curr->state == CHANNEL_STATE_CLOSING ||
|
if (!(curr->state == CHANNEL_STATE_CLOSING ||
|
||||||
|
Loading…
Reference in New Issue
Block a user