-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: immediately queue STUN request after forming pair #476
feat: immediately queue STUN request after forming pair #476
Conversation
I could also solve this in my code by calling |
Actually, I don't think I can because |
Interesting! In the rest of str0m the order of actions is always:
Depending on the change in 1, the timeout in 2 might be Looking at the |
I guess that is what we are currently doing "wrong". We create a I guess that could be change to reset this future any time state changes within our node. That is probably the more correct approach to handle these timeouts. I'll experiment with that. |
Yeah, and the final tweak would be to lower that 50 to 0 in for this case. |
I guess this is generally a downside of SANS-IO :( There are plenty of opportunities to use the API the "wrong" way. |
Definitely! I'm speculating that there might be a pattern or something that could be "discovered" to unlock that. If only 10% of the effort spent on perfecting async in Rust was spent on it, we probably solve it already :) |
Instead a separate |
I've found a combination of firezone/firezone#4022 and #477 to achieve the same effect which seems like a cleaner solution. |
In my testing, I've found this to improve connection setup latency by about 0.7 seconds. There might be a better way of solving this but I wanted to open a PR to start the discussion.
The reason this makes things faster is because we would otherwise only queue the STUN requests upon the next
handle_timeout
to theIceAgent
.