-
Notifications
You must be signed in to change notification settings - Fork 115
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
Adding note about when ICE restarts are recommended. #1910
Conversation
I think @nils-ohlmeier will strongly disagree |
Indeed I disagree with the statement in this pull request. I'll comment in more details in #1445 |
if you used 'failed' instead of 'disconnected' 👍 on giving guidance (even if minimal) |
I can't count how many times I've seen |
Failed occurs after 30 seconds though (or at least, it's supposed to); that's too late to be useful. |
Indeed 30 seconds is too late. But since disconnected is a volatile state which depends on browser implementation (see my comment over in #1445 for details) I would highly discourage people from using disconnected as the only input for your decision when to attempt an ICE restart. |
What is too late highly depends on the use case. If its a video conference - certainly. If it's a long term data only connection, >10 seconds can be fine. So, maybe we can say something like: "If in the |
Even with Firefox's implementation, I'd argue that doing an ICE restart on "disconnected" is far better than doing it on "failed" or doing nothing. And even if it ends up being pointless, it shouldn't have a negative effect besides wasting some bandwidth. I tried to allude to your points:
Is there alternative wording you'd suggest? Replace "is recommended" with "may be desired" or something less strong? I'm completely open to suggestions, I just want to say something about this. |
I only want to prevent overly dramatic reactions on the |
Giving concrete guidance here is hard since "it depends". Also as Lennart points out a videochat has different requirements from a filetransfer. I can sign off this:
For a recommendation:
So disconnected, getStats, wait 2 seconds, do getStats again (and also check if iceConnectionState is still disconnected!), figure out nothing is sent/received, then do an ice restart. Thankfully @henbos fixed this issue for me which also allows this on the sender side |
I like @fippo proposal a lot better. Because with the change in the PR I'm afraid to many will read the first sentence and only implement that, ignoring the second sentence. And this fear is based on lots of people don't understanding that Firefox disconnected state behaves differently then Chromes. |
In that case, going with fippo's suggestion; thanks! |
Fixes #1445.