Skip to content
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

Skip the two-second delay when ICETransportPolicy=ICETransportPolicyRelay #324

Open
jech opened this issue Jan 14, 2021 · 5 comments
Open
Labels
bug Something isn't working

Comments

@jech
Copy link
Member

jech commented Jan 14, 2021

When looping back through a TURN relay, Chrome takes a few milliseconds to connect: https://github.com/jech/galene/blob/master/static/galene.js#L2307

The equivalent code on the server side takes 2 seconds: https://github.com/jech/galene/blob/master/ice/ice.go#L127

The reason for that is that the TURN delay is fixed to two seconds (ice.defaultRelayAcceptanceMinWait), and this delay is honoured even when ICETransportPolicy is set to relay.

@Sean-Der Sean-Der transferred this issue from pion/webrtc Jan 14, 2021
@Sean-Der
Copy link
Member

This should be pretty easy to fix!

First I need to confirm if settings aren't properly getting passed here

Then we also need to lower timeouts depending on enabled types here

@jech
Copy link
Member Author

jech commented Jan 14, 2021

I've added this to the test:

	s.SetHostAcceptanceMinWait(0)
	s.SetSrflxAcceptanceMinWait(0)
	s.SetPrflxAcceptanceMinWait(0)
	s.SetRelayAcceptanceMinWait(0)

and the timing is similar to the browser's.

@AnshulMalik
Copy link
Contributor

Let's say we add 0 wait times for all these, and now we got the relay candidate, so we nominate it and proceed with connection.
And say after a second, we also got a srlfx candidate. So I wanted to know, if we can now choose this instead of the relay one automatically?

@jech
Copy link
Member Author

jech commented Dec 2, 2022

This issue is about the case when ICETransportPolicy=ICETransportPolicyRelay. There can be no server-refexive candidates in that case, so it's safe to skip the initial delay.

The general case is interesting too, but it's a different issue.

@stv0g stv0g added the bug Something isn't working label Apr 12, 2023
@stv0g
Copy link
Member

stv0g commented Apr 12, 2023

@jech Maybe fixing this in pion/webrtc is the better place? ICETransportPolicy is a setting from the webrtc module if I am not mistaken?

@stv0g stv0g changed the title Pion should skip the two-second delay when ICETransportPolicy=ICETransportPolicyRelay Skip the two-second delay when ICETransportPolicy=ICETransportPolicyRelay Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

4 participants