tor-proto: Fix possible bug when no hops are ready

What I think can happen is that if Circuit::ready_streams_iterator returns an empty Stream, ConfluxSet::circuit_action will select_biased! on this empty stream and next() will cause us to immediately return None. I think it would be better to instead wait on the other arms of the select_biased! in this case. By immediately returning None, my worry is that the tunnel reactor can end up in a spin loop where ConfluxSet::circuit_action immediately returns None, causing Reactor::run_once to finish immediately and cause Reactor::run to spin.

@gabi-250 While I do think that it's better to not return None, I'm not sure if there's some other edge case I'm not considering where returning a std::future::pending() might be bad.

Merge request reports

Loading