{connection_or,channel}_flush_from_first_active_circuit() should pick a new circuit for each cell
View options
- Truncate descriptions
Before channels, this function was always called with max == 1; during the course of testing channels I discovered that it is broken with max > 1.
We pick cell_ewma once per invocation:
Then once per cell, we pop the head of the pqueue and re-add it (to get it to its new correct position):
... but if the new position is not the head of the queue, we don't change cell_ewma and we continue sending from the same circuit - and then the assert fails the next time around.
This function should be refactored to not do this and to separate the policy choice of what priority order to impose on circuits from the mechanism of picking a circuit, pulling cells off it and sending them down the wire.
- Show labels
- Show closed items